Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
added 169 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

Obs.: did not work either with: KEYBOARD_KEY_7e=j

Some more alternative ways (by @vinc17) to find the keys:
evtest /dev/input/by-id/... or
input-kbd 3 (put the id index found at ls -l /dev/input/by-id/* from ex. event3)

PS.: *If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value there "0x00"

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

Obs.: did not work either with: KEYBOARD_KEY_7e=j

PS.: *If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value there "0x00"

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

Obs.: did not work either with: KEYBOARD_KEY_7e=j

Some more alternative ways (by @vinc17) to find the keys:
evtest /dev/input/by-id/... or
input-kbd 3 (put the id index found at ls -l /dev/input/by-id/* from ex. event3)

PS.: *If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value there "0x00"

Tweeted twitter.com/#!/StackUnix/status/535901105717510144
added 54 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value 0x00 at that game "The Dark Mod" (its newest version still have the same problem).

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

PSObs.: did not work either with: KEYBOARD_KEY_7e=j

PS.: *If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value there "0x00"

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value 0x00 at that game "The Dark Mod" (its newest version still have the same problem).

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

PS.: did not work either with: KEYBOARD_KEY_7e=j

I am trying to find a way to remap keyboard keys forcefully.
I tried using xmodmap and setxkbmap, but they do not work for one specific application. Such commands work for other normal windowed/applications on X tho.

I think the application may be reading the keyboard raw data and ignoring X input?

So, how to remap keys without using xmodmap and setxkbmap? if it is ever possible to be done using some software.

I also tried xkeycaps, xkbcomp, but did not try loadkeys, as it is running on X.

I found here that I could try setkeycodes, "because after assigning kernel keycode the button should work in xorg", but I also found that "you can't use 'setkeycodes' on USB keyboards", that's my case (I am interested in case someone make it work on ps2 as I think I could use an adapter).

This seemed promising "Map scancodes to keycodes", but after a few tests nothing changed, here are they:
I found keycode "36" ("j" key) at vt1 with showkey
I found scancode "7e" (keypad ".") at vt1 with showkey --scancodes

$cat >/etc/udev/hwdb.d/90-custom-keyboard.hwdb keyboard:usb:v*p* keyboard:dmi:bvn*:bvr*:bd*:svn*:pn*:pvr* KEYBOARD_KEY_7e=36 $udevadm hwdb --update #updates file: /lib/udev/hwdb.bin $udevadm trigger #should apply the changes but nothing happened $cat /lib/udev/hwdb.bin |egrep "KEYBOARD_KEY_7e.{10}" -ao KEYBOARD_KEY_7eleftmeta $#that cat on hwdb.bin did not change after the commands.. 

Obs.: did not work either with: KEYBOARD_KEY_7e=j

PS.: *If you are interested on testing yourself, the related thread for the application is this: http://forums.thedarkmod.com/topic/14266-keyboard-issue-in-new-version-108/ The issues I have are the same: some keys (KP_Decimal, DownArrow, UpArrow, RightArrow) are ignored and considered all with the same value there "0x00"

added 54 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
added 324 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
added 250 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
added 363 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
added 1 character in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
added 88 characters in body
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading
Source Link
Aquarius Power
  • 4.6k
  • 5
  • 44
  • 66
Loading