[Bf-blender-cvs] [79e040b] master: Fix T38143: pressing F12 key in the text editor on OS X would type an invalid character.

Brecht Van Lommel noreply at git.blender.org
Fri Jan 10 19:44:12 CET 2014


Commit: 79e040ba9581a2f386bbb467d43998e779accf78
Author: Brecht Van Lommel
Date:   Fri Jan 10 19:39:35 2014 +0100
https://developer.blender.org/rB79e040ba9581a2f386bbb467d43998e779accf78

Fix T38143: pressing F12 key in the text editor on OS X would type an invalid character.

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

M	intern/ghost/intern/GHOST_SystemCocoa.mm

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

diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index c60ded1..b7b1079 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1559,6 +1559,10 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
 			if ((keyCode > 266) && (keyCode < 271))
 				utf8_buf[0] = '\0';
 
+			/* F keys should not have utf8 */
+			if ((keyCode >= GHOST_kKeyF1) && (keyCode <= GHOST_kKeyF20))
+				utf8_buf[0] = '\0';
+
 			/* no text with command key pressed */
 			if (m_modifierMask & NSCommandKeyMask)
 				utf8_buf[0] = '\0';




More information about the Bf-blender-cvs mailing list