Skip to content

Instantly share code, notes, and snippets.

@JensAyton
Created September 6, 2009 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JensAyton/181978 to your computer and use it in GitHub Desktop.
Save JensAyton/181978 to your computer and use it in GitHub Desktop.
enum
{
kVKC_Shift = 56,
kVKC_Option = 58,
kVKC_Control = 59,
kVKC_rShift = 60, /* Right-hand modifiers; not implemented */
kVKC_rOption = 61,
kVKC_rControl = 62,
kVKC_Command = 55,
}
#define KEYMAP_GET(m, index) ((((uint8_t*)(m))[(index) >> 3] & (1L << ((index) & 7))) ? 1 : 0)
KeyMap map;
GetKeys(map);
return KEYMAP_GET(map, kVKC_Shift) || KEYMAP_GET(map, kVKC_rShift);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment