diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-06 09:24:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-06 09:31:28 +0300 |
commit | 5be0e3430d13341feddee739997130239daf71d5 (patch) | |
tree | b8af4c1d47d40425d0703883f8efdc0c297e37ea /source/blender/windowmanager/WM_types.h | |
parent | 73ef27f15611ccb254816e199f8c74103b3d5172 (diff) |
GHOST/Keymap: support for detecting repeat events
- Keymap items now have 'repeat' boolean which can be set
to make keymap items respond to key repeat events or not.
- Support for X11 & WIN32 (not macOS currently).
This allows for the possibility to perform actions while a key is held
and finish the action upon release.
Thanks to @Severin for review and WIN32 support.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index d5853045091..2038871844f 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -540,7 +540,9 @@ typedef struct wmEvent { char utf8_buf[6]; /** From ghost, fallback if utf8 isn't set. */ char ascii; - char pad; + + /** Generated by auto-repeat. */ + char is_repeat; /** Previous state, used for double click and the 'click'. */ short prevtype; |