help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to change the keyboard mapping?


From: Sharon Kimble
Subject: Re: How to change the keyboard mapping?
Date: Mon, 15 Aug 2016 14:01:13 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

bvraghav@iitk.ac.in (B.V. Raghav) writes:

> 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.
>

Thanks for this fulsome reply BV. Its now all working perfectly.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

Attachment: signature.asc
Description: PGP signature


reply via email to

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