Skip to content

Commit

Permalink
Adding more hotkeys on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyGharbi committed Mar 2, 2020
1 parent de6596b commit 38322bc
Showing 1 changed file with 65 additions and 11 deletions.
76 changes: 65 additions & 11 deletions source/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -660,16 +660,26 @@ void storeStringKeyCodes(void) {
std::make_pair("F22", VC_F22),
std::make_pair("F23", VC_F23),
std::make_pair("F24", VC_F24),
std::make_pair("1", VC_1),
std::make_pair("2", VC_2),
std::make_pair("3", VC_3),
std::make_pair("4", VC_4),
std::make_pair("5", VC_5),
std::make_pair("6", VC_6),
std::make_pair("7", VC_7),
std::make_pair("8", VC_8),
std::make_pair("9", VC_9),
std::make_pair("0", VC_0),
std::make_pair("1", VC_KP_1),
std::make_pair("2", VC_KP_2),
std::make_pair("3", VC_KP_3),
std::make_pair("4", VC_KP_4),
std::make_pair("5", VC_KP_5),
std::make_pair("6", VC_KP_6),
std::make_pair("7", VC_KP_7),
std::make_pair("8", VC_KP_8),
std::make_pair("9", VC_KP_9),
std::make_pair("0", VC_KP_0),
std::make_pair("Digit1", VC_1),
std::make_pair("Digit2", VC_2),
std::make_pair("Digit3", VC_3),
std::make_pair("Digit4", VC_4),
std::make_pair("Digit5", VC_5),
std::make_pair("Digit6", VC_6),
std::make_pair("Digit7", VC_7),
std::make_pair("Digit8", VC_8),
std::make_pair("Digit9", VC_9),
std::make_pair("Digit0", VC_0),
std::make_pair("Backspace", VC_BACKSPACE),
std::make_pair("Tab", VC_TAB),
std::make_pair("KeyA", VC_A),
Expand Down Expand Up @@ -702,7 +712,51 @@ void storeStringKeyCodes(void) {
std::make_pair("CommandOrControl", MASK_META),
std::make_pair("Command", MASK_META),
std::make_pair("Alt", MASK_ALT),
std::make_pair("Shift", MASK_SHIFT)
std::make_pair("Shift", MASK_SHIFT),

// Keyboard
std::make_pair("Backspace", VC_BACKSPACE),
std::make_pair("Tab", VC_TAB),
std::make_pair("Clear", VC_CLEAR),
std::make_pair("Enter", VC_ENTER),
std::make_pair("Menu", VC_CONTEXT_MENU),
// std::make_pair("LeftMenu", VK_LMENU), std::make_pair("RightMenu", VK_RMENU),
// std::make_pair("OSLeft", VK_LWIN), std::make_pair("OSRight", VK_RWIN),
std::make_pair("Pause", VC_PAUSE),
// std::make_pair("Capital", VK_CAPITAL),
std::make_pair("CapsLock", VC_CAPS_LOCK),
std::make_pair("NumLock", VC_NUM_LOCK),
std::make_pair("ScrollLock", VC_SCROLL_LOCK),
std::make_pair("Escape", VC_ESCAPE),
std::make_pair("Space", VC_SPACE),
std::make_pair("PageUp", VC_KP_PAGE_UP), std::make_pair("PageDown", VC_KP_PAGE_DOWN),
std::make_pair("Home", VC_KP_HOME), std::make_pair("End", VC_KP_END),
std::make_pair("Left", VC_KP_LEFT), std::make_pair("Right", VC_KP_RIGHT),
std::make_pair("Up", VC_KP_UP), std::make_pair("Down", VC_KP_DOWN),
// std::make_pair("Select", VK_SELECT),
// std::make_pair("Print", VK_PRINT),
// std::make_pair("Execute", VK_EXECUTE),
// std::make_pair("Snapshot", VK_SNAPSHOT),
std::make_pair("PrintScreen", VC_PRINTSCREEN),
std::make_pair("Insert", VC_SUN_INSERT), std::make_pair("Delete", VC_DELETE),
std::make_pair("Help", VC_SUN_HELP),
// std::make_pair("Apps", VK_APPS),
std::make_pair("Sleep", VC_SLEEP),

/// OEM Keys
std::make_pair("Semicolon", VC_SEMICOLON), std::make_pair("Equal", VC_EQUALS),
std::make_pair("Comma", VC_COMMA), std::make_pair("Minus", VC_MINUS),
std::make_pair("Period", VC_PERIOD), std::make_pair("Slash", VC_SLASH),
std::make_pair("Backquote", VC_BACKQUOTE), std::make_pair("BracketLeft", VC_OPEN_BRACKET),
std::make_pair("Backslash", VC_BACK_SLASH), std::make_pair("BracketRight", VC_CLOSE_BRACKET),
std::make_pair("Quote", VC_QUOTE),
// Arrows
std::make_pair("ArrowUp", VC_UP), std::make_pair("ArrowLeft", VC_LEFT),
std::make_pair("ArrowRight", VC_RIGHT), std::make_pair("ArrowDown", VC_DOWN),

/// Media
std::make_pair("MediaPlayPause", VC_MEDIA_PLAY), std::make_pair("MediaTrackPrevious", VC_MEDIA_PREVIOUS),
std::make_pair("MediaTrackNext", VC_MEDIA_NEXT), std::make_pair("MediaStop", VC_MEDIA_STOP)
};

g_modifiers = {
Expand Down

0 comments on commit 38322bc

Please sign in to comment.