Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2019-12-10 08:54:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-10 09:13:02 +0300
commitb7533f92e5e515555951ca00cec0690c7f59d8f4 (patch)
tree99593c938b5c56927458926646cdb1aa095b5ffb /intern
parentdfb6af3011c13b8f090fed2e932c9e5120887642 (diff)
GHOST: add support for application/menu key
Support the application key on Linux & Windows.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/GHOST_Types.h1
-rw-r--r--intern/ghost/intern/GHOST_EventPrinter.cpp3
-rw-r--r--intern/ghost/intern/GHOST_SystemSDL.cpp1
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp3
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp1
5 files changed, 9 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index 32472373b17..fab315e5f13 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -312,6 +312,7 @@ typedef enum {
GHOST_kKeyRightAlt,
GHOST_kKeyOS, // Command key on Apple, Windows key(s) on Windows
GHOST_kKeyGrLess, // German PC only!
+ GHOST_kKeyApp, /* Also known as menu key. */
GHOST_kKeyCapsLock,
GHOST_kKeyNumLock,
diff --git a/intern/ghost/intern/GHOST_EventPrinter.cpp b/intern/ghost/intern/GHOST_EventPrinter.cpp
index ba9ed6e3037..119c9f28223 100644
--- a/intern/ghost/intern/GHOST_EventPrinter.cpp
+++ b/intern/ghost/intern/GHOST_EventPrinter.cpp
@@ -234,6 +234,9 @@ void GHOST_EventPrinter::getKeyString(GHOST_TKey key, char str[32]) const
case GHOST_kKeyOS:
tstr = "OS";
break;
+ case GHOST_kKeyApp:
+ tstr = "App";
+ break;
case GHOST_kKeyGrLess:
// PC german!
tstr = "GrLess";
diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp
index 06a82db1de5..d3295d5584c 100644
--- a/intern/ghost/intern/GHOST_SystemSDL.cpp
+++ b/intern/ghost/intern/GHOST_SystemSDL.cpp
@@ -234,6 +234,7 @@ static GHOST_TKey convertSDLKey(SDL_Scancode key)
GXMAP(type, SDL_SCANCODE_RALT, GHOST_kKeyRightAlt);
GXMAP(type, SDL_SCANCODE_LGUI, GHOST_kKeyOS);
GXMAP(type, SDL_SCANCODE_RGUI, GHOST_kKeyOS);
+ GXMAP(type, SDL_SCANCODE_APPLICATION, GHOST_kKeyApp);
GXMAP(type, SDL_SCANCODE_INSERT, GHOST_kKeyInsert);
GXMAP(type, SDL_SCANCODE_DELETE, GHOST_kKeyDelete);
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index c0a4376fd4c..fa2fc9fff37 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -821,6 +821,9 @@ GHOST_TKey GHOST_SystemWin32::convertKey(short vKey, short scanCode, short exten
case VK_RWIN:
key = GHOST_kKeyOS;
break;
+ case VK_APPS:
+ key = GHOST_kKeyApp;
+ break;
case VK_NUMLOCK:
key = GHOST_kKeyNumLock;
break;
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 72c0ad761a4..24a577a18c4 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1721,6 +1721,7 @@ static GHOST_TKey ghost_key_from_keysym(const KeySym key)
GXMAP(type, XK_Caps_Lock, GHOST_kKeyCapsLock);
GXMAP(type, XK_Scroll_Lock, GHOST_kKeyScrollLock);
GXMAP(type, XK_Num_Lock, GHOST_kKeyNumLock);
+ GXMAP(type, XK_Menu, GHOST_kKeyApp);
/* keypad events */