On 7/19/07, federico ferri <[EMAIL PROTECTED]> wrote:
Dmitry Torokhov ha scritto:
>> # echo "84 183" | keyfuzz -s -d/dev/input/event1
>> EVIOCGKEYCODE: Invalid argument
>>
>> # echo "84 183" | keyfuzz -s -d/dev/input/event2
>> EVIOCGKEYCODE: Invalid argument
>>
>> # echo "0x05d 0x0b7" | keyfuzz -s -d/dev/input/event2
>> EVIOCGKEYCODE: Invalid argument
> What is 84? For SUB you map a "usage" to a keycode and regular key
> usages start with 0x00070000...
84 == 0x5d (KEY_SYSRQ)
183 is the code generated from my keyboard when I press F13


Ahh, I see. But when you press F13 hardware does not generate 183. USB
generates some big number (below), PS/2 generates sequence like 0x5d
(not sure) and keyboard connected to a serial port generates something
else. Keyfuzz needs scancode in the format that is driver-specific.

I don't get what "usage" means here;

USB's "scancode".

my keyboard has no fancy/multimedia
keys (except 4 buttons_ volumeup, volume-down, mute, eject, but those
belong to another event device)

the keyfuzz manual page says:
      The  scancode/keycode  translation  tables  as  read from STDIN
      [...]. All other lines have to contain a scancode and a keycode
      number separated by white space. The numbers may be specified
      either in decimal or in hexadecimal notation. [...]

I typed my commands with the above in mind.
anyway, if I try to load the bundled translation tables (r.g. the
default one) to my event device, I get the same error.

That is undersandable because your keyboard is difefrent and does not
use the same "scancodes" as AT keyboard.


do you see some solution? perhaps can you supply an example of
re-mapping F13 to SysRq?


KEY_F13 is normally assigned to usage 0x00070068. Since you want your
F13 to be used as SysRq you need map that usage to KEY_SYSRQ. Please
try doing:

echo "458856 84" | keyfuzz -s -d/dev/input/eventX

--
Dmitry

Reply via email to