"ISO_Next_Group" mapping.


To translate system input method switch to emacs' one I use the code
listed below. It works fine in Debian based Ubuntu Hoary, but doesn't
work in Debian Sarge. Sawfish and X.org user defined configuration
changes are the same.

In Ubuntu it's possible to "capture" "ISO_Next_Group" after clicking
"Grab" button in the Binding Customization dialogue, and in Debian
it's not.

Please help me to find out -- where is the difference:
in Sawfish or in X.org and how to make Debian Sawfish catch
"ISO_Next_Group". Or, maybe, there is a more elegant way to use the
same input method switch in emacs and the rest of the world.


(define-match-window-setter 'keymap-trans
  (lambda (w prop value)
    (declare (unused prop))
    (let ((keymap (or (window-get w 'keymap)
                      (window-put w 'keymap (copy-sequence window-keymap)))))
       (lambda (pair)
          keymap (car pair)
          (lambda () (interactive)
            (synthesize-event (lookup-event (cadr pair)) (input-focus)))))

(add-window-matcher 'WM_CLASS "Emacs"
                    '(keymap-trans . (("ISO_Next_Group" "C-\\") ("Button6-ISO_Next_Group" "C-\\"))))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]