Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2022-01-10 20:52:19 +0300
committerHarley Acheson <harley.acheson@gmail.com>2022-01-10 20:52:19 +0300
commitccf06fffbcdc6895732491dec68c3136e8785432 (patch)
treed9f5a94339fd3eb78498b41b880f60703a9197ac
parent57bea57f5ec6ba7240e494f647df053df300afab (diff)
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
-rw-r--r--source/blender/editors/interface/interface_handlers.c7
1 files changed, 6 insertions, 1 deletions
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);
}