[plt-scheme] overwrite button canceled + other keybindings

From: Bill Richter (richter at math.northwestern.edu)
Date: Thu Feb 6 00:45:43 EST 2003

Thanks, Robby. 

   > f9     <- undo
   > c:f9   <- redo
   > insert <- paste-clipboard
   > f6     <- save-file
   
   Are these keybindings standard for some platform you use? Which one?

No, unfortunately.  I've made 4 more bindings, listed below.  But let
me vote for important commands being bound to function keys, just to
save chords (hard to type),and here's a ramble about standards:

In a sense, it shouldn't matter that they're not standard, because
DrScheme uses the XEmacs defaults rather than the GNU Emacs defaults
(e.g. S-mouse-1 is copy rather than mouse-3, and M-Backspace is
backward-kill-word rather than M-Delete).  So there are standard
bindings that can't easily be installed anyway.  

I'm giving S-mouse-1 a try, and I rebound it in my .emacs file:

(global-unset-key [S-down-mouse-1])   ;; took me a while to grok 
(global-set-key [S-mouse-1] 'mouse-save-then-kill)

Switching M-Backspace and M-Delete isn't so easy (you know how goofy
Emacs is about Backspace/Delete :-D), so I changed DrScheme.  

Now the binding f1 = help is standard I think.  But maybe not 
f5 = execute, nor f6 = Syntax Check.  

I always save the file before executing, in case it hangs, so I was
typing `M-s M-t' constantly.  `f6 f5' is simpler.  I constantly typed
Esc-C-right-arrow
to select a sexp, that's a nice function.  I type M-e & M-d a lot.

Now Insert = overwrite-toggle is standard, but I get rid of it anyway.
It took me years to learn of this binding, because the numeric keypad
Insert key doesn't do anything, only the "upper island" Insert key.  I
think I was hitting this Insert key accidentally (it's right next to
Backspace and Delete), and the only thing I could do was undo text I'd
just fwd-deleted, and then quit DrScheme.  About a week ago I realized
I could toggle back with the "upper island" Insert key.

I wouldn't care much what function keys you bound, I just care about
what's bound.  What about filling up the numeric keypad with bindings,
and then have a box to check whether you wanted to activate all of
them?  Some folks probably use the numeric keypad for entering number.

What I actually use in Emacs is more like

kp-7 = beginning-of-buffer, 
kp-1 = end-of-buffer, 
kp-5 = center-view-on-line, 
M-kp-5 = "bring-this-line-to-top" ;;  M-0 C-l in Emacs
kp-minus = delete-clipboard
kp-add = paste-clipboard
kp-enter = save-file
kp-insert="indent-sexp"  ;; M-C-q in Emacs

There's some method to this.  The kp-arrow keys could be various
fwd/back/up/down sexp functions.  Some other method would be fine.

Now in Emacs, I bound kp-subtract to C-w, which is different from DEL,
even though both will kill a selection.  DrScheme doesn't have a
separate notion of a region, though, so there's no great sense in
using kp-subtract to do what DEL does.


********* My new bindings *********

in plt/collects/drscheme/syncheck.ss:

             (map "f6" "save-file")

in plt/collects/framework/private/keymap.ss:

             (map "f4" "center-view-on-line")
             (map "f7" "delete-to-end-of-line")
             (map "f9" "undo")
             (map "c:f9" "redo")
	     (map "insert" "paste-clipboard")
             (map-meta "Backspace" "backward-kill-word")

in plt/collects/framework/private/scheme.ss:

          (send keymap map-function "f12" "select-forward-sexp")





Posted on the users mailing list.