fix bug #1546
authorJens Ole Wund <bjornmose@gmx.net>
Sun, 7 Nov 2004 16:30:19 +0000 (16:30 +0000)
committerJens Ole Wund <bjornmose@gmx.net>
Sun, 7 Nov 2004 16:30:19 +0000 (16:30 +0000)
ghost was unaware of extra *<>* key on german keyboards on windows

intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_EventPrinter.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp
source/blender/include/mydevice.h
source/blender/src/ghostwinlay.c

index f14f120a386ca569ca0a8af46b2c741cff29bb7b..ff507db6f5141174fc0195a82499c67bb2cc5e39 100644 (file)
@@ -232,6 +232,7 @@ typedef enum {
        GHOST_kKeyLeftAlt,
        GHOST_kKeyRightAlt,
     GHOST_kKeyCommand,                         // APPLE only!
+    GHOST_kKeyGrLess ,         // German PC only!
 
        GHOST_kKeyCapsLock,
        GHOST_kKeyNumLock,
index 953fecbd88f11dda9ce893ebb2c8cc37623b5bfc..e959ee8893b4fb8bb14bbf47c32aa98244e05750 100644 (file)
@@ -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;
index b11dd7b3cc83ee39048ccf3f738989003e1c5c01..f381b8f6b0b423152ed667b3d1f1d6d295f70d3a 100644 (file)
 #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:
index 1a8c2daeba53cbd83dddfefbac29025260c313b7..b8832606c6df0e15a21059572f35eeef30b36a13 100644 (file)
 
 #define UNKNOWNKEY     171
 #define COMMANDKEY     172
+#define GRLESSKEY      173
 
 /* used as fake leftmouse event, special handled in interface.c */
 #define BUT_ACTIVATE   200
index ac80513e882e466e1b2cb0a8791d7bbc7e413b72..2e147dac8cfdc274e523e1df0dc28c4f7479ee9d 100644 (file)
@@ -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: