From 23e8b982288699258c4bf4d7f5464f968b98d5cf Mon Sep 17 00:00:00 2001 From: Jens Ole Wund Date: Sun, 7 Nov 2004 16:30:19 +0000 Subject: fix bug #1546 ghost was unaware of extra *<>* key on german keyboards on windows --- intern/ghost/GHOST_Types.h | 1 + intern/ghost/intern/GHOST_EventPrinter.cpp | 4 ++++ intern/ghost/intern/GHOST_SystemWin32.cpp | 4 ++++ 3 files changed, 9 insertions(+) (limited to 'intern') 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: -- cgit v1.2.3