You are not logged in.

#1 2015-04-13 02:03:41

mjandrews
Member
From: Nottingham, UK
Registered: 2013-03-26
Posts: 17

[solved] change awesome arrow keys from e.g. Left to KP_Left, etc

I have a laptop where my arrows keys have more or less stopped working (they work only if you bang down on them with force using a pen). This makes using awesome difficult. For example, I need to use Mod4 + Left/Right to move across tags.
I have a functioning keypad. While the arrow keys there work fine for e.g. cursor movement in an editor, they are not interchangeable in awesome with the ordinary arrows keys.
Using xev, I see my ordinary arrows keys are e.g. keycode 113 = "Left", keycode 114 = "Right" and my keypad arrow keys are e.g. keycode 83 = "KP_Left", keycode 85 = "KP_Right", etc. I presume there is some lua file somewhere where I could tell awesome to use keycode 83 or "KP_Left" instead of keycode 113 or "Left". I naively searched for "Left" and "Right" etc in the lua files under /usr/share/awesome but found nothing that seemed to be doing this mapping.

Does any one know how I could tell awesome to ignore Left, Right etc and use KP_Left, KP_Right, etc?

thank you,
-m

Last edited by mjandrews (2015-04-13 19:18:29)

Offline

#2 2015-04-13 04:44:00

VanillaFunk
Member
From: MA. USA
Registered: 2013-06-10
Posts: 396
Website

Re: [solved] change awesome arrow keys from e.g. Left to KP_Left, etc

can you not declare the keys in rc.lua in ~/.config/awesome/ ?? i know thats where i would search first and try to change it


archx86_64 : awesomewm
https://github.com/dreemsoul

Remeber to feed the squirrels

Offline

#3 2015-04-13 19:18:04

mjandrews
Member
From: Nottingham, UK
Registered: 2013-03-26
Posts: 17

Re: [solved] change awesome arrow keys from e.g. Left to KP_Left, etc

Thanks! I was being thick and didn't even look in ~/.config/awesome/rc.lua.

Sure enough, in there there is code like

awful.key({ modkey,           }, "Left",   awful.tag.viewprev       )

that I can easily change to

awful.key({ modkey,           }, "KP_Left",   awful.tag.viewprev       )

etc.

That's all I needed.

Offline

Board footer

Powered by FluxBB