[OpenBIOS] [PATCH 1/10] Dummy get-key-map in keyboard device package

William Hahne hahne1 at illinois.edu
Wed Aug 10 16:47:06 CEST 2011


I actually was unable to find documentation and had to figure it out by
looking at the BootX source code. TestForKey
in BootX-45/bootx.tproj/sl.subproj/main.c if you are interested. This is the
version of BootX used in 10.2.

William Hahne

On Wed, Aug 10, 2011 at 5:38 AM, Mark Cave-Ayland <
mark.cave-ayland at siriusit.co.uk> wrote:

> On 09/08/11 22:54, William Hahne wrote:
>
>  "get-key-map" is a Forth word that provides a map of all the keys
>> currently pressed on the keyboard. Since it is only used by BootX to
>> determine if one of the shortcuts for verbose or single user mode is
>> pressed. It is a waste of time to provide a full implementation. This
>> just hands out a dummy key map which specifies verbose mode.
>>
>> Index: drivers/adb_kbd.c
>> ==============================**==============================**=======
>> --- drivers/adb_kbd.c (revision 1041)
>> +++ drivers/adb_kbd.c (working copy)
>> @@ -43,10 +43,13 @@
>>  static void keyboard_read(void);
>> +static void keyboard_get_key_map(void);
>> +
>>  NODE_METHODS( keyboard ) = {
>> { "open", keyboard_open },
>> { "close", keyboard_close },
>> { "read",               keyboard_read },
>> + { "get-key-map", keyboard_get_key_map },
>>  };
>>  /* VT100 escape sequences */
>> @@ -566,3 +569,18 @@
>> }
>> PUSH(i);
>>  }
>> +
>> +static unsigned char fake_keymap[32] = {
>> + 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
>> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>> + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00
>> +};
>> +
>> +static void keyboard_get_key_map(void)
>> +{
>> + /* This is a bit of a hack since BootX requires a get-key-map word.
>> +    In the future this should be changed to give the actual current
>> keymap,
>> +    but since this only effects keyboard input in BootX it isn't a
>> priority. */
>> + PUSH( (int)fake_keymap );
>> +}
>>
>
> Can you add a reference in the commit message to the documentation for the
> keymap layout? It's not clear how you generated the contents of the keymap
> blob.
>
>
> ATB,
>
> Mark.
>
> --
> Mark Cave-Ayland - Senior Technical Architect
> PostgreSQL - PostGIS
> Sirius Corporation plc - control through freedom
> http://www.siriusit.co.uk
> t: +44 870 608 0063
>
> Sirius Labs: http://www.siriusit.co.uk/labs
>
> --
> OpenBIOS                 http://openbios.org/
> Mailinglist:  http://lists.openbios.org/**mailman/listinfo<http://lists.openbios.org/mailman/listinfo>
> Free your System - May the Forth be with you
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openbios.org/pipermail/openbios/attachments/20110810/c002413f/attachment.html>


More information about the OpenBIOS mailing list