[Bf-blender-cvs] [dc19936] master: Fix T42426. Add support for UK "`" key.

Alexandr Kuznetsov noreply at git.blender.org
Sun Nov 30 20:45:10 CET 2014


Commit: dc199369d12eec16c566bc31afde737fa77922d5
Author: Alexandr Kuznetsov
Date:   Sun Nov 30 14:44:53 2014 -0500
Branches: master
https://developer.blender.org/rBdc199369d12eec16c566bc31afde737fa77922d5

Fix T42426. Add support for UK "`" key.

Because key == OEM_8, there no clear conversion for different keyboard layouts.
Also, we must map key to GhostKey for shortcuts.

===================================================================

M	intern/ghost/intern/GHOST_SystemWin32.cpp

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index d659997..3b793fd 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -508,6 +508,7 @@ GHOST_TKey GHOST_SystemWin32::hardKey(GHOST_IWindow *window, RAWINPUT const &raw
 
 //! note: this function can be extended to include other exotic cases as they arise.
 // This function was added in response to bug [#25715]
+// This is going to be a long list [T42426]
 GHOST_TKey GHOST_SystemWin32::processSpecialKey(GHOST_IWindow *window, short vKey, short scanCode) const
 {
 	GHOST_TKey key = GHOST_kKeyUnknown;
@@ -515,6 +516,10 @@ GHOST_TKey GHOST_SystemWin32::processSpecialKey(GHOST_IWindow *window, short vKe
 		case LANG_FRENCH:
 			if (vKey == VK_OEM_8) key = GHOST_kKeyF13;  // oem key; used purely for shortcuts .
 			break;
+		case LANG_ENGLISH:
+			if (SUBLANGID(m_langId) == SUBLANG_ENGLISH_UK && vKey == VK_OEM_8) // "`¬"
+				key = GHOST_kKeyAccentGrave;
+			break;
 	}
 
 	return key;




More information about the Bf-blender-cvs mailing list