comparison lisp/x-win-sun.el @ 380:8626e4521993 r21-2-5

Import from CVS: tag r21-2-5
author cvs
date Mon, 13 Aug 2007 11:07:10 +0200
parents c5d627a313b1
children 74fd4e045ea6
comparison
equal deleted inserted replaced
379:76b7d63099ad 380:8626e4521993
62 ;; stupid Sun names, but also allows indirection if no explicit 62 ;; stupid Sun names, but also allows indirection if no explicit
63 ;; key-binding exists. 63 ;; key-binding exists.
64 64
65 ;;; Code: 65 ;;; Code:
66 66
67 ;;;###autoload
67 (defun x-win-init-sun () 68 (defun x-win-init-sun ()
68
69 (defun x-remap-keysyms-using-function-key-map (from-key to-key)
70 (dolist (prefix '(() (shift) (control) (meta) (alt)
71 (shift control) (shift alt) (shift meta)
72 (control alt) (control meta) (alt meta)
73 (shift control alt) (shift control meta)
74 (shift alt meta) (control alt meta)
75 (shift control alt meta)))
76 (define-key function-key-map
77 (append prefix (list from-key))
78 (vector (append prefix (list to-key))))))
79 69
80 ;; help is ok 70 ;; help is ok
81 ;; num_lock is ok 71 ;; num_lock is ok
82 ;; up is ok 72 ;; up is ok
83 ;; left is ok 73 ;; left is ok
162 (SunF37 f12) 152 (SunF37 f12)
163 (f11 stop) 153 (f11 stop)
164 (f12 again)))) 154 (f12 again))))
165 ) 155 )
166 do (when (x-keysym-on-keyboard-sans-modifiers-p from-key) 156 do (when (x-keysym-on-keyboard-sans-modifiers-p from-key)
167 (x-remap-keysyms-using-function-key-map from-key to-key))) 157 (dolist (prefix '(() (shift) (control) (meta) (alt)
168 158 (shift control) (shift alt) (shift meta)
169 (unintern 'x-remap-keysyms-using-function-key-map) 159 (control alt) (control meta) (alt meta)
160 (shift control alt) (shift control meta)
161 (shift alt meta) (control alt meta)
162 (shift control alt meta)))
163 (define-key function-key-map
164 (append prefix (list from-key))
165 (vector (append prefix (list to-key)))))))
170 166
171 ;; for each element in the left column of the above table, alias it 167 ;; for each element in the left column of the above table, alias it
172 ;; to the thing in the right column. Then do the same for many, but 168 ;; to the thing in the right column. Then do the same for many, but
173 ;; not all, modifier combinations. 169 ;; not all, modifier combinations.
174 ;; 170 ;;