diff --git a/src/Keyboard.cpp b/src/Keyboard.cpp index a28d48d..b64e4b7 100644 --- a/src/Keyboard.cpp +++ b/src/Keyboard.cpp @@ -226,7 +226,19 @@ std::map Keyboard::specialKeyToVirtualKeyMap = { {Keyboard::ALT, kVK_Option}, {Keyboard::CONTROL, kVK_Control}, {Keyboard::SHIFT, kVK_Shift}, - {Keyboard::CAPSLOCK, kVK_CapsLock}}; + {Keyboard::CAPSLOCK, kVK_CapsLock}, + {Keyboard::F1, kVK_F1}, + {Keyboard::F2, kVK_F2}, + {Keyboard::F3, kVK_F3}, + {Keyboard::F4, kVK_F4}, + {Keyboard::F5, kVK_F5}, + {Keyboard::F6, kVK_F6}, + {Keyboard::F7, kVK_F7}, + {Keyboard::F8, kVK_F8}, + {Keyboard::F9, kVK_F9}, + {Keyboard::F10, kVK_F10}, + {Keyboard::F11, kVK_F11}, + {Keyboard::F12, kVK_F12}}; #endif char Keyboard::VirtualKeyToAscii(KeyCode virtualKey) { @@ -342,7 +354,19 @@ std::map Keyboard::specialKeyToVirtualKeyMap = { {Keyboard::ALT, VK_MENU}, {Keyboard::CONTROL, VK_CONTROL}, {Keyboard::SHIFT, VK_SHIFT}, - {Keyboard::CAPSLOCK, VK_CAPITAL}}; + {Keyboard::CAPSLOCK, VK_CAPITAL}, + {Keyboard::F1, VK_F1}, + {Keyboard::F2, VK_F2}, + {Keyboard::F3, VK_F3}, + {Keyboard::F4, VK_F4}, + {Keyboard::F5, VK_F5}, + {Keyboard::F6, VK_F6}, + {Keyboard::F7, VK_F7}, + {Keyboard::F8, VK_F8}, + {Keyboard::F9, VK_F9}, + {Keyboard::F10, VK_F10}, + {Keyboard::F11, VK_F11}, + {Keyboard::F12, VK_F12}}; #endif #ifdef __APPLE__ diff --git a/src/Keyboard.h b/src/Keyboard.h index 06708f3..c811f1f 100644 --- a/src/Keyboard.h +++ b/src/Keyboard.h @@ -42,7 +42,19 @@ class Keyboard { ALT, CONTROL, SHIFT, - CAPSLOCK + CAPSLOCK, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + F8, + F9, + F10, + F11, + F12 }; static const char INVALID_ASCII;