![]() Navigate to /dev/input/by-id and find your Apple keyboard that ends in "-event-kbd": cd /dev/input/by-id ![]() Sudo apt-get install lynx xmltoman gengetoptĬompile and install keyfuzz with the usual commands. configure below may spit out some errors: sudo apt-get update Dont' use a directory too deep (or with spaces possibly) or else the.It is released under the GNU GPL 2.0 or later open source license (yaaay open source!). This solution is done in the user space, and does NOT require recompiling the kernel like some suggestions.ĭownload source for keyfuzz ( ), and extract it (I can right-click it and go to "Extract Here" to extract it in my GUI file manager, for instance). Many thanks to Bengt Olsson for his excellent instructions here which gave me the necessary start to figure out the missing details. If you're looking for more of an old-fashioned, "Two-Fisted Tales of Linux" sort of experience, there are some kernel patches linked from that comment thread, which may offer guidance in remapping keycodes at the kernel level.Īfter 3 or 4 hrs of hard searching, reading, and trial and error, here's a more thorough and generic answer which should work for any Apple/Mac laptop or keyboard In my particular case, however, I'm using this solution for a 2008 MacBook white running Xubuntu 16.04 LTS. This maps Alt-Eject on a typical Apple Macbook Pro (mine is mid-2010, 6,2), to the Alt-SysRq combination. Update: Apparently this can be done from userspace:īest 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 Or perhaps you will be the first after all, custom-hacking your kernel is half the fun of running Linux, or so I am given to understand.) (On the other hand, it seems probable a kernel could be compiled to recognize a different scan code, such as that of the Mac's eject key, in place of SysRq I've never felt the urge to downgrade my MBP, so wouldn't know firsthand, but I imagine someone's done it. Linux will interpret the scan code properly no matter what architecture it's running on the tricky part, in this case, is generating the scan code in the first place, which cannot be done from a standard Mac keyboard. If you want real magic SysRq functionality, rather than the pale imitation obtained by echoing into random /proc entries, you'll want to find yourself a PC-style USB keyboard with a SysRq key. (This of course assumes you're running a kernel with magic SysRq compiled into it, and have previously done echo 1 > /proc/sys/kernel/sysrq in /etc/rc.local or similar.) Without a key generating the same scan code, which you don't have, the only option is to echo > /proc/sysrq-trigger, where is the key you'd press along with M-SysRq.
0 Comments
Leave a Reply. |