[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modified keypad keys
From: |
Juri Linkov |
Subject: |
Re: Modified keypad keys |
Date: |
Sat, 29 Sep 2012 22:19:35 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) |
>> +(defun powerset (list)
>> + (if (null list)
>> + '(nil)
>> + (let ((ps (powerset (cdr list))))
>> + (append ps (mapcar (lambda (e) (cons (car list) e)) ps)))))
>
> I'm not sure I want `powerset' without some "<prefix>-".
Maybe `cl-powerset', to be added to cl-seq.el.
>> +(let ((modifiers (powerset '(control meta super hyper)))
>
> You forgot shift.
Not sure about shift. It's used to toggle the layout of the keypad
at the system level. Also `shift-select-mode' comes into play.
So without adding `shift' to these remappings, when e.g.
`kp-7' self-inserts `7', `S-kp-7' selects the region
to the beginning of the line.
> So that's a total of 27 * 32 entries. Makes this function-key-map alist
> pretty long, if you ask me.
An alternative is to do as suggested in the comments:
;; X11R6 distinguishes these keys from the non-kp keys.
;; Make them behave like the non-kp keys unless otherwise bound.
;; FIXME: rather than list such mappings for every modifier-combination,
;; we should come up with a way to do it generically, something like
;; (define-key function-key-map [*-kp-home] [*-home])
I guess `*' should be a symbol like `shift', so it would be possible
also use this notation:
(define-key function-key-map [(* kp-home)] [(* home)])
- Modified keypad keys, Per Starbäck, 2012/09/28
- Re: Modified keypad keys, Stefan Monnier, 2012/09/28
- Re: Modified keypad keys, Juri Linkov, 2012/09/28
- Re: Modified keypad keys, Stefan Monnier, 2012/09/28
- Re: Modified keypad keys, Stefan Monnier, 2012/09/28
- Re: Modified keypad keys,
Juri Linkov <=
- Re: Modified keypad keys, Stefan Monnier, 2012/09/29
- Re: Modified keypad keys, Juri Linkov, 2012/09/30
- Re: Modified keypad keys, Stefan Monnier, 2012/09/30