Mercurial > hg > xemacs-beta
comparison lisp/x-win-xfree86.el @ 4478:ec442dc06fe1
Merge.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 10 Jul 2008 23:37:52 +0200 |
parents | e34711681f30 |
children | e3ef34f57070 |
comparison
equal
deleted
inserted
replaced
4476:dbf79a1732ba | 4478:ec442dc06fe1 |
---|---|
43 | 43 |
44 (globally-declare-fboundp | 44 (globally-declare-fboundp |
45 '(x-keysym-on-keyboard-p x-keysym-on-keyboard-sans-modifiers-p)) | 45 '(x-keysym-on-keyboard-p x-keysym-on-keyboard-sans-modifiers-p)) |
46 | 46 |
47 ;;;###autoload | 47 ;;;###autoload |
48 (defun x-win-init-xfree86 () | 48 (defun x-win-init-xfree86 (device) |
49 | 49 |
50 ;; We know this keyboard is an XFree86 keyboard. As such, we can predict | 50 ;; We know this keyboard is an XFree86 keyboard. As such, we can predict |
51 ;; what key scan codes will correspond to the keys on US keyboard layout, | 51 ;; what key scan codes will correspond to the keys on US keyboard layout, |
52 ;; and we can use that information to fall back to the US layout when | 52 ;; and we can use that information to fall back to the US layout when |
53 ;; looking up commands that would otherwise fail. (Cf. the hard-coding of | 53 ;; looking up commands that would otherwise fail. (Cf. the hard-coding of |
89 (f21 f9) | 89 (f21 f9) |
90 (f22 f10) | 90 (f22 f10) |
91 (f23 f11) | 91 (f23 f11) |
92 (f24 f12)) | 92 (f24 f12)) |
93 do | 93 do |
94 (when (and (x-keysym-on-keyboard-p key) | 94 (when (and (x-keysym-on-keyboard-p key device) |
95 (not (x-keysym-on-keyboard-sans-modifiers-p key))) | 95 (not (x-keysym-on-keyboard-sans-modifiers-p key device))) |
96 ;; define also the control, meta, and meta-control versions. | 96 ;; define also the control, meta, and meta-control versions. |
97 (loop for mods in '(() (control) (meta) (meta control)) do | 97 (loop for mods in '(() (control) (meta) (meta control)) do |
98 (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) | 98 (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) |
99 )))) | 99 )))) |
100 | 100 |