Menu

#17 Mac OS X - Support for MacBook US + ISO and Wired ISO keyboard layouts

v1.0 (example)
open
nobody
None
5
2014-03-24
2014-03-07
No

The Mac port could do with additional selectable keyboard layouts for the 4 current physical Apple layouts (don't believe they've changed since 2007):

  • MacBook / Wireless US
  • MacBook / Wireless ISO
  • Wired US
  • Wired ISO

In addition the Keyboard Event mapping tables could do with a bit of a tidy up, as the Event names are slightly inconsistent between the DispKbd.c and the keyboard.h files e.g.

{VK_DASH,1,11},           // X(minus, 1, 11)
{VK_BACK,1,14},          // X(backspase, 1, 14)
{VK_BRACKETLEFT,3,1},    // X(bracket_l, 1, 11)
{VK_BRACKETRIGHT,3,2},    // X(bracket_r, 3, 2)
{VK_CAPITAL,5,13},       // X(caps_lock, 5, 13)
{VK_APOSTROPHY,4,6},     // X(apostrophe, 4, 6)
{VK_BACKTICK,1,0},      // X(grave, 1, 0)
{VK_LCONTROL,3,11},     // X(control_l, 3, 11)
{VK_RSHIFT,5,8},        // X(shift_r, 5, 8)

Wondering what to do with the: ISO_KEY / ISO_Section (0x0A) key.

Discussion

  • Andrew Roberts

    Andrew Roberts - 2014-03-07

    Note: The lack of a numeric key keypad on the majority of current Macs makes capturing the mouse a real pain.

     
  • Andrew Roberts

    Andrew Roberts - 2014-03-24

    THe ARCEMXMOUSEKEY environment variable logic will work on all Unix( BSD / Linux / OS X) flavours, but I've been having a bit of a dig for a more elegant / programmatic solution, and so far have failed. I've been trying to find some mechanism to determine whether an attached keyboard has a numeric keypad, which seems a bit of obvious functionality, but can't find any standard libraries that offer this (can obviously detect key presses / events but too late), and so far have only found a few frigs to determine whether there is a numeric keypad e.g.
    http://stackoverflow.com/questions/12549614/detecting-the-presence-absence-of-a-numeric-keypad

    Or assuming all non internal keyboards will have a keypad you could add a simple wrapper to the exec e.g.

    (ioreg -Src IOUSBDevice | grep "USB Product Name" | grep "Keyboard" | egrep -v "Hub|Internal")>/dev/null || export ARCEMXMOUSEKEY="§"; ./arcem

    OR:

    (system_profiler SPUSBDataType | grep "Keyboard" | egrep -v "Hub|Internal")>/dev/null || export ARCEMXMOUSEKEY="§"; ./arcem

    OR:

    (lsusb | grep "Keyboard" | egrep -v "Hub|Internal")>/dev/null || export ARCEMXMOUSEKEY="§"; ./arcem

     

    Last edit: Andrew Roberts 2014-03-25

Log in to post a comment.

MongoDB Logo MongoDB