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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-07-03 16:07:46 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-07-03 16:55:22 +0300
commit947cdb3acd296d8e2e849586d5a41cc0d0dcb28c (patch)
tree36eb74d8f0185c747e50dc21c7087420d83afa47 /source/blender/editors/interface/interface_handlers.c
parent36426c3ee2d957c1898555f51ec828b31c5f746c (diff)
UI: add ability to access/generate 'shortcuts strings' of modal keymaps.
We already had that for global keymaps (used e.g. to generate shortcuts for menu entries), but this wasn’t possible for modal keymaps yet (e.g. help message in header during transforms and other modal operation). This commit only adds needing background code, it does not change anything from user PoV. Modal operators will be updated to use it in comming weeks. Thanks to Campbell for revisions & suggestions. :) Differential Revision: https://developer.blender.org/D780
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r--source/blender/editors/interface/interface_handlers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 58cf6b900b9..c51d9906fa5 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -3651,7 +3651,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
if (event->val == KM_PRESS) {
if (ISHOTKEY(event->type)) {
- if (WM_key_event_string(event->type)[0])
+ if (WM_key_event_string(event->type, false)[0])
ui_but_value_set(but, event->type);
else
data->cancel = true;
@@ -3687,7 +3687,7 @@ static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, c
}
if (event->val == KM_PRESS) {
- if (WM_key_event_string(event->type)[0])
+ if (WM_key_event_string(event->type, false)[0])
ui_but_value_set(but, event->type);
else
data->cancel = true;