[Bf-blender-cvs] [ccf06fffbcd] master: UI: Allow AltGr Key + C, V, X Text Input

Harley Acheson noreply at git.blender.org
Mon Jan 10 18:54:16 CET 2022


Commit: ccf06fffbcdc6895732491dec68c3136e8785432
Author: Harley Acheson
Date:   Mon Jan 10 09:52:19 2022 -0800
Branches: master
https://developer.blender.org/rBccf06fffbcdc6895732491dec68c3136e8785432

UI: Allow AltGr Key + C,V,X Text Input

Slight change to our processing of Ctrl-C, Ctrl-V, and Ctrl-X so that
they will not be triggered if Alt is also pressed. This allows entry
of AltGr-C, -V, -X when using International keyboard layouts.

See D13781 for more details

Differential Revision: https://developer.blender.org/D13781

Reviewed by Brecht Van Lommel

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

M	source/blender/editors/interface/interface_handlers.c

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

diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7521ccf4e4c..6ecaead67ce 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3762,7 +3762,12 @@ static void ui_do_but_textedit(
       case EVT_VKEY:
       case EVT_XKEY:
       case EVT_CKEY:
-        if (IS_EVENT_MOD(event, ctrl, oskey)) {
+#if defined(__APPLE__)
+        if ((event->oskey && !IS_EVENT_MOD(event, shift, alt, ctrl)) ||
+            (event->ctrl && !IS_EVENT_MOD(event, shift, alt, oskey))) {
+#else
+        if (event->ctrl && !IS_EVENT_MOD(event, shift, alt, oskey)) {
+#endif
           if (event->type == EVT_VKEY) {
             changed = ui_textedit_copypaste(but, data, UI_TEXTEDIT_PASTE);
           }



More information about the Bf-blender-cvs mailing list