View previous topic :: View next topic |
Author |
Message |
shimitar Guru
Joined: 23 Nov 2003 Posts: 320 Location: Italy, Torino
|
Posted: Tue Dec 16, 2014 2:31 pm Post subject: Some keys do not work on my keyboard! |
|
|
Hi all!
Still on my TF700T (Asus arm based tablet with dock), the keyboard i have has a custom row of keys in place of the ESC - Function keys row... i would like to remap a few of them, like at least ESC and the function keys... of course, in X.
I am a bit at a loss.. where should i look to to that?
(i am using lxde, so i am looking for a low-level way to do it) _________________ Willy Gardiol
willy@gardiol.org |
|
Back to top |
|
|
SDNick484 Apprentice
Joined: 05 Dec 2005 Posts: 231
|
Posted: Tue Dec 16, 2014 6:42 pm Post subject: |
|
|
The general process is to figure out what scan codes the keys are sending when pressed (for that I use xev). Then you map the scancodes to keycodes (via udev, setkeycodes, etc.). If you want to turn them into macros, (i.e. if they're "media keys"), and you're in a X windows environment, you could use xbindkeys (or your window manager may provide similar functionality).
Arch actually has good wiki entries on this:
Identify Extra Keyboard Keys
Map Scancodes to Keycodes
For xbindkeys (or using your WM), just search it in Google (plenty of examples). |
|
Back to top |
|
|
shimitar Guru
Joined: 23 Nov 2003 Posts: 320 Location: Italy, Torino
|
Posted: Tue Dec 16, 2014 8:47 pm Post subject: |
|
|
using xev i managed to see that all my keys are already mapped... to quite useless keycodes.
For example, the "back" key is mapped to XF86Back.... which i would like to map to ESC instead...
Do you have any inputs on how do i do that?
thank you! _________________ Willy Gardiol
willy@gardiol.org |
|
Back to top |
|
|
SDNick484 Apprentice
Joined: 05 Dec 2005 Posts: 231
|
Posted: Wed Dec 17, 2014 12:57 am Post subject: |
|
|
It's a good thing that they're all functioning and mapped actually. What window manager or desktop environment are you using? Most of them provide mechanisms to change these in their control panel (I know Gnome, KDE, & Xfce4 all do). Others like fluxbox can do it in their config file.
Another option is to do it at a lower level via xmodmap. Basically just create a ~/.Xmodmap file with the mapping. i.e. if xev tells you XF86Back is associated to keycode 166 (see below), you can set it to escape via the line "keycode 166=Escape" in your ~/.Xmodmap file. Google for more examples/other keys. For doing it on the console, see here.
xev example:
KeyPress event, serial 29, synthetic NO, window 0x5e00001,
root 0xbc, subw 0x0, time 2375874, (1279,794), root:(1285,881),
state 0x10, keycode 166 (keysym 0x1008ff26, XF86Back), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False |
|
Back to top |
|
|
shimitar Guru
Joined: 23 Nov 2003 Posts: 320 Location: Italy, Torino
|
Posted: Wed Dec 17, 2014 8:15 am Post subject: |
|
|
Well, that fixed it... now i can remap my escape and all my F keys.
One more thing, is it possible to map also a meta-combination? I would like to map some more keycodes to, for example, "shift-F1"...
i am using lxde, so it's mostly via command line and scripts. _________________ Willy Gardiol
willy@gardiol.org |
|
Back to top |
|
|
xaviermiller Bodhisattva
Joined: 23 Jul 2004 Posts: 8708 Location: ~Brussels - Belgique
|
Posted: Wed Dec 17, 2014 8:32 am Post subject: |
|
|
Do you have a "fn" key, which provides multimedia and display control features ?
Try to look on the BIOS if these function keys are enabled by default.
Some keyboards (my Lenovo laptop) have a "fn lock" button to swicth from multimedia to standard keyboard fonctions. _________________ Kind regards,
Xavier Miller |
|
Back to top |
|
|
shimitar Guru
Joined: 23 Nov 2003 Posts: 320 Location: Italy, Torino
|
Posted: Wed Dec 17, 2014 8:38 am Post subject: |
|
|
There is no bios, it's an ARM Android tablet dock keyboard on an Android ARM tablet, which i have dual-booted into Gentoo, by installing it on the microsd and using kexecboot to boot it.
As for the keys, i do have a "fn" key but no "fn' keys are mapped to those.
The first row of keys are all "special". The are, in order: "back", bluetooth, disable touchpad, screen darker, screen lighter, auto-brightness, take photo, launch webbrowser, open android settings, prev song, pause/play, next song, mute, volume down, vollume up, lock screen.
i have mapped them to escape and F1-F12, but i would like to keep a few of those keys as they original function... maybe with shift cobinations... FN combinations does not seems to work.. FN works with other keys, like pgdown/pgup, but i get a different scancode for those, so i guess it does not work with the other keys. _________________ Willy Gardiol
willy@gardiol.org |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Wed Dec 17, 2014 3:49 pm Post subject: |
|
|
You can use `xbindkeys` to map key combinations. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|