diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index f14f120a386..ff507db6f51 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -232,6 +232,7 @@ typedef enum { GHOST_kKeyLeftAlt, GHOST_kKeyRightAlt, GHOST_kKeyCommand, // APPLE only! + GHOST_kKeyGrLess , // German PC only! GHOST_kKeyCapsLock, GHOST_kKeyNumLock, diff --git a/intern/ghost/intern/GHOST_EventPrinter.cpp b/intern/ghost/intern/GHOST_EventPrinter.cpp index 953fecbd88f..e959ee8893b 100644 --- a/intern/ghost/intern/GHOST_EventPrinter.cpp +++ b/intern/ghost/intern/GHOST_EventPrinter.cpp @@ -193,6 +193,10 @@ void GHOST_EventPrinter::getKeyString(GHOST_TKey key, STR_String& str) const // APPLE only! str = "Command"; break; + case GHOST_kKeyGrLess: + // PC german! + str = "GrLess"; + break; case GHOST_kKeyCapsLock: str = "CapsLock"; break; diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index b11dd7b3cc8..f381b8f6b0b 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -103,6 +103,9 @@ #ifndef VK_CLOSE_BRACKET #define VK_CLOSE_BRACKET 0xDD #endif // VK_CLOSE_BRACKET +#ifndef VK_GR_LESS +#define VK_GR_LESS 0xE2 +#endif // VK_GR_LESS GHOST_SystemWin32::GHOST_SystemWin32() @@ -407,6 +410,7 @@ GHOST_TKey GHOST_SystemWin32::convertKey(WPARAM wParam, LPARAM lParam) const case VK_BACK_SLASH: key = GHOST_kKeyBackslash; break; case VK_CLOSE_BRACKET: key = GHOST_kKeyRightBracket; break; case VK_QUOTE: key = GHOST_kKeyQuote; break; + case VK_GR_LESS: key = GHOST_kKeyGrLess; break; // Process these keys separately because we need to distinguish right from left modifier keys case VK_SHIFT: diff --git a/source/blender/include/mydevice.h b/source/blender/include/mydevice.h index 1a8c2daeba5..b8832606c6d 100644 --- a/source/blender/include/mydevice.h +++ b/source/blender/include/mydevice.h @@ -187,6 +187,7 @@ #define UNKNOWNKEY 171 #define COMMANDKEY 172 +#define GRLESSKEY 173 /* used as fake leftmouse event, special handled in interface.c */ #define BUT_ACTIVATE 200 diff --git a/source/blender/src/ghostwinlay.c b/source/blender/src/ghostwinlay.c index ac80513e882..2e147dac8cf 100644 --- a/source/blender/src/ghostwinlay.c +++ b/source/blender/src/ghostwinlay.c @@ -267,7 +267,9 @@ static int convert_key(GHOST_TKey key) { case GHOST_kKeyNumpadMinus: return PADMINUS; case GHOST_kKeyNumpadAsterisk: return PADASTERKEY; case GHOST_kKeyNumpadSlash: return PADSLASHKEY; - + + case GHOST_kKeyGrLess: return GRLESSKEY; + case GHOST_kKeyUnknown: return UNKNOWNKEY; default: