The great key rebinding (part 2).
authorMark Wooding <mdw@distorted.org.uk>
Tue, 6 May 2008 14:36:35 +0000 (15:36 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 6 May 2008 14:36:35 +0000 (15:36 +0100)
We assume that the X server is running with DontZap.  Still, to make
C-M-DEL actually do the right thing, we need to do two more hacks.

  * xinitrc: Remove the mapping of BackSpace to Terminate_Server.
    Because DontZap is set, this keysym does nothing at all, which is
    much less helpful than just being a modified backspace.

  * emacs: For some reason, ESC C-DEL is bound by default, but C-M-DEL
    isn't.  Provide the binding ourselves.

emacs
xinitrc

diff --git a/emacs b/emacs
index e2075ed..f3429bd 100644 (file)
--- a/emacs
+++ b/emacs
 (global-set-key [delete] 'delete-char)
 (global-set-key [?\M-q] 'mdw-fill-paragraph)
 (global-set-key [?\C-h ?\C-m] 'manual-entry)
+(global-set-key [C-M-backspace] 'backward-kill-sexp)
 (global-set-key [mode-line C-mouse-1] 'mouse-tear-off-window)
 (global-set-key [vertical-scroll-bar C-down-mouse-1]
                'mouse-drag-vertical-line)
diff --git a/xinitrc b/xinitrc
index 60a11e6..6141ab5 100755 (executable)
--- a/xinitrc
+++ b/xinitrc
@@ -91,6 +91,9 @@ initialize () {
   run init xset r rate 500 50
   run init xset m 2 1
 
+  ## Key mappings.
+  xmodmap -e 'keysym BackSpace = BackSpace BackSpace'
+
   ## Gnome settings.
   case $vnc in no) run bginit gnome-settings-daemon ;; esac
 }