emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 01 Oct 2012 12:29:59 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu)

> So the kp-7 vs kp-home choice is done at a low-level, as expected.
> So adding remappings like S-kp-home => S-home to function-key-map is
> a good idea.

Yes, I guess S-kp-home => S-home could be added since it does no harm
when it is already translated at a low-level.

> [ Of course there's the question whether S-kp-home should be turned
>   into `home' via `kp-home' or via `S-home'.  ]

When simply adding `shift' to the list of modifiers in

(let ((modifiers (cl-powerset '(control meta shift super hyper)))
      (keys '((kp-end . end) (kp-down . down) (kp-next . next)
              (kp-left . left) (kp-begin . begin) (kp-right . right)
              (kp-home . home) (kp-up . up) (kp-prior . prior)
              (kp-insert . insert) (kp-delete . delete) (kp-enter . enter)
              (kp-add . +) (kp-subtract . -) (kp-multiply . *) (kp-divide . /)
              (kp-1 . ?1) (kp-2 . ?2) (kp-3 . ?3) (kp-4 . ?4) (kp-5 . ?5)
              (kp-6 . ?6) (kp-7 . ?7) (kp-8 . ?8) (kp-9 . ?9) (kp-0 . ?0)
              (kp-decimal . .))))
  (dolist (pair keys)
    (dolist (mod modifiers)
      (define-key function-key-map
        (vector (append mod (list (car pair))))
        (vector (append mod (list (cdr pair))))))))

it will turn `S-kp-home' into `home' via `S-home'.

>> ;; Don't bind shifted keypad numeric keys, they reportedly
>> ;; interfere with the feature of some keyboards to produce
>> ;; numbers when NumLock is off.
>> ...
>> ;(define-key function-key-map [S-kp-7] [S-home])
>> ...
>> (define-key function-key-map [C-S-kp-7] [C-S-home])
>
> These are very different remappings, which seemed to be aimed at
> reimplementing what your low-level keyboard code already provides.

So remappings like S-kp-7 => S-home should be still used
when low-level keyboard code doesn't translate them?
But I don't know how to detect this configuration when
low-level keyboard code doesn't supports such translation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]