[plt-scheme] overwrite button canceled + other keybindings

From: Bill Richter (richter at math.northwestern.edu)
Date: Tue Feb 4 23:46:04 EST 2003

I finally rid of toggle-overwrite in DrScheme!  I made some other
simple keybinding changes too, even though I know zip about MrEd.  I
hope I didn't do anything dangerous.  I bound 

f9     <- undo
c:f9   <- redo
insert <- paste-clipboard
f6     <- save-file

The PLT Help Desk FAQ reads:

   Can I change the key bindings in DrScheme? 

	Technically, yes, but that requires in-depth information about
	the way that DrScheme is implemented. (The necessary
	information is part of the MrEd toolbox manual.)

But I just had to make small changes to 2 files:

plt/collects/drscheme/syncheck.ss.orig
plt/collects/framework/private/keymap.ss

Context diffs below.  I figured this out all by grepping, e.g.

   (artin)plt> find . -name \*.ss -exec grep f6 {} \; -print
	  (send keymap map-function "f6" "check syntax")
   ./collects/drscheme/syncheck.ss

I was not aware of this binding or the function `Check Syntax'.
Interesting function, but the colors are tough, and there's no toggle!

I couldn't find where `M-e' and `M-d' are bound.  I couldn't bind
anything on the numeric keypad.  Some care was needed -- I had to bind
`save-file' in the same place where the other save-file bindings were.


*** /tmp/syncheck.ss.orig	Tue Feb  4 22:20:40 2003
--- /tmp/syncheck.ss	Tue Feb  4 22:20:40 2003
***************
*** 958,964 ****
                          (when (is-a? frame syncheck-frame<%>)
                            (send frame syncheck:button-callback))))))))
          
!         (send keymap map-function "f6" "check syntax")
          (send keymap map-function "c:c;c:c" "check syntax"))
          
        
--- 958,964 ----
                          (when (is-a? frame syncheck-frame<%>)
                            (send frame syncheck:button-callback))))))))
          
!        ;(send keymap map-function "f6" "check syntax")
          (send keymap map-function "c:c;c:c" "check syntax"))
          
        

*** /tmp/keymap.ss.orig	Tue Feb  4 22:26:13 2003
--- /tmp/keymap.ss	Tue Feb  4 22:26:13 2003
***************
*** 1055,1060 ****
--- 1055,1062 ----
  	      (map "a:z" "undo")
  	      (map "d:z" "undo")
  	      (map "c:x;u" "undo")
+ 	      (map "f9" "undo")
+ 	      (map "c:f9" "redo")
  	      (map "c:w" "cut-clipboard")
  	      (map "a:x" "cut-clipboard")
  	      (map "d:x" "cut-clipboard")
***************
*** 1075,1082 ****
  	      
  	      (map "c:space" "toggle-anchor")
  	      
! 	      (map "insert" "toggle-overwrite")
! 	      (map-meta "o" "toggle-overwrite")
  	      
  	      (map-meta "g" "goto-line")
  	      (map-meta "p" "goto-position")
--- 1077,1085 ----
  	      
  	      (map "c:space" "toggle-anchor")
  	      
! 	     ;(map "insert" "toggle-overwrite")
! 	      (map "insert" "paste-clipboard")
! 	     ;(map-meta "o" "toggle-overwrite")
  	      
  	      (map-meta "g" "goto-line")
  	      (map-meta "p" "goto-position")
***************
*** 1217,1222 ****
--- 1220,1226 ----
  	      
  	      (map "c:x;c:s" "save-file")
  	      (map "d:s" "save-file")
+ 	      (map "f6" "save-file")
  	      (map "c:x;c:w" "save-file-as")
  	      (map "c:x;c:f" "load-file")))))
        




Posted on the users mailing list.