[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to change the keyboard mapping?
From: |
B.V. Raghav |
Subject: |
Re: How to change the keyboard mapping? |
Date: |
Sat, 13 Aug 2016 19:46:45 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Hi,
> How can I map my alpha-ENTER to be the same as my numerical-ENTER please?
I checked for the keycode using xev in my terminal
The two enter keys produce this line in their respective output:
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
state 0x0, keycode 104 (keysym 0xff8d, KP_Enter), same_screen YES,
`C-h k <kp-enter>' provides the key binding in current mode. Then I run
`M-: (local-set-key (kbd "<kp-enter>") (lambda () (interactive) (message
"KP Enter pressed")))' and press <kp-enter>. It works.
So I think there are two ways I should proceed
1. Explicitly map <kp-enter> to the same command as <return> in the
particular mode I am talking about.
2. Or, use Xmodmap to simulate a return globally. I should append into
the .Xmodmap file, and invoke it in the .xinitrc
keycode 104 = Return
For more details on xmodmap, `M-x man RET xmodmap RET', and
https://wiki.archlinux.org/index.php/xmodmap
There should be more elegant ways to do the job, but this is FWIW.
HTH
r
--
(B.V. Raghav)
Ph.D. Student,
Design Programme, IIT Kanpur
Ph: +91-9450988137
Email: bvraghav@gmail.com
Re: How to change the keyboard mapping?,
B.V. Raghav <=