[OpenBIOS] Detecting command key

Tarl Neustaedter tarl-b2 at tarl.net
Wed Oct 31 03:47:16 CET 2012


On 2012-Oct-30 22:30 , Programmingkid wrote:
> What word in Open Firmware can be used to detect the command key being pushed? Something that isn't get-key-map. I have tried key, but it didn't work.

Unless the console driver has changed considerably, the command key 
isn't exposed to the end-user. The keyboard driver parses keystrokes 
(things like shift-keystroke causing a different value than simple 
keystroke) and passes ascii codes up to the key? method.

In the Sun version, this is handled in obp/pkg/keyboard/* - look for 
keycodes.fth, keytable.fth and keymap.fth, they likely have the code 
involved. But the short answer is that "key?" returns an ascii value, 
not a keystroke.




More information about the OpenBIOS mailing list