I thought that the SysRq implementation was embedded into the kernel at such a low level that remapping wouldn't work.
I thought that the SysRq implementation was embedded into the kernel at such a low level that remapping wouldn't work.
the keyfuzz app seems to change the keycode at the dev interface level rather than in xorg, thus the system would see SysRq as the actual key that was pressed.
Again, I have not tried this, and this is all based on one user's post above. I suggest that you try the implementation stated and see if it actually works.
I'm a little confused, where did you get 0x00070068?
If I look in /usr/include/linux/input.h all the values don't look anything close to that.
Also, any idea why I have two entries for my keyboard here:
Do I use event7 or event8?Code:$ cat /proc/bus/input/devices <snip> I: Bus=0003 Vendor=05ac Product=021a Version=0111 N: Name="Apple Computer Apple Internal Keyboard / Trackpad" P: Phys=usb-0000:00:1d.0-2/input0 S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.0/input/input7 U: Uniq= H: Handlers=kbd event7 B: EV=120013 B: KEY=e10000 0 0 0 7b00000000 10c4000000 e0aeffdf01cfffff fffffffffffffffe B: MSC=10 B: LED=1f I: Bus=0003 Vendor=05ac Product=021a Version=0111 N: Name="Apple Computer Apple Internal Keyboard / Trackpad" P: Phys=usb-0000:00:1d.0-2/input2 S: Sysfs=/devices/pci0000:00/0000:00:1d.0/usb1/1-2/1-2:1.2/input/input8 U: Uniq= H: Handlers=kbd event8 B: EV=13 B: KEY=200000000 0 0 B: MSC=10 <snip>
Thanks!
i think that one is the trackpad, the other is the keyboard. not sure how to tell the difference. You could do an lsusb maybe and figure out the correct device IDs.
This may also help:
http://0pointer.de/lennart/projects/...#documentation
So I've been playing around with this for a while and haven't gotten it to work yet. Here's what I've tried, maybe someone can tell me where I've gone wrong.
I'm trying to remap alt-F12 as SysRq. According to showkey and input.h, the decimal value for F12 is 88. 0d88 = 0x58 and for some reason you need to add 0x070000 to this because it is a USB keyboard which gives you 0x070058 = 0d458840.
I have noticed that after every reboot, the event id changes. Sometimes the keyboard might be event1 and sometimes it can be something completely different. For this reason I've chosed to useto guarantee that I'm using the correct input device.Code:/dev/input/by-id/usb-Apple_Computer_Apple_Internal_Keyboard_._Trackpad-event-kbd
the last bit of info needed is the SysRq keycode which is 99.
This doesn't seem to work for me. I believe I should be able to recall the assignment using the following command but nothing appears to have changed:Code:echo "458840 99" | sudo keyfuzz -s -d /dev/input/by-id/usb-Apple_Computer_Apple_Internal_Keyboard_._Trackpad-event-kbd
Any ideas?Code:sudo keyfuzz --get -d /dev/input/by-id/usb-Apple_Computer_Apple_Internal_Keyboard_._Trackpad-event-kbd ### evdev 1.0.0., driver 'Apple Computer Apple Internal Keyboard / Trackpad' 0x000 0x01d ### EOF
Best way to go currently is to install (manually compile) the keyfuzz program and put
echo "786616 99" | keyfuzz -s -d /dev/input/by-id/usb-Apple_Inc._Apple_Internal_Keyboard___Trackpad-event-kbd
in your /etc/profile for instance. This maps Alt-Eject on a typical Apple Macbook Pro (mine is mid-2010, 6,2), to the Alt-SysRq combination.
Hardest was discovering 786616, which is 0xc00b8. For the "consumer" part of the USB HID codes one apparently does not add 0x70000 but 0xc0000. I found the code via the little program getscancodes (again, compile yourself).
For F12 it would have been 458821.
Goodluck!
Bookmarks