You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
br-parser-tools/collects/mrdemo/keymap.ss

17 lines
590 B
Scheme

; We'll use the same function as both a keyboard and mouse event
; handler. If it's a mouse event, we only want to insert something
; on the button-down part
(define insert-star
(lambda (edit event)
(if (or (not (is-a? event wx:mouse-event%))
(send event button-down?))
(send edit insert "*"))
#t))
(let ((kmap (send mred:console-edit get-keymap)))
(send kmap add-key-function "insert-star" insert-star)
(send kmap add-mouse-function "insert-star" insert-star)
(send kmap map-function "c:." "insert-star")
(send kmap map-function "ESC;rightbutton" "insert-star"))