diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-30 09:08:09 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-10-30 09:08:09 +0200 |
commit | b1e9b313f6810afbadde0f8079326ecf04c89817 (patch) | |
tree | 93299da98c3f3fdffadb1e09a51ccd56df71b8f1 /src/ui/keys.h | |
parent | 653c055d145d940a318025ca74762f6b8024bf5a (diff) |
Added a key binding mechanism
The document scrolling keys are now handled via bindings.
Diffstat (limited to 'src/ui/keys.h')
-rw-r--r-- | src/ui/keys.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/ui/keys.h b/src/ui/keys.h index a9b13df3..157ddea5 100644 --- a/src/ui/keys.h +++ b/src/ui/keys.h | |||
@@ -22,7 +22,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
22 | 22 | ||
23 | #pragma once | 23 | #pragma once |
24 | 24 | ||
25 | #include <the_Foundation/defs.h> | 25 | #include <the_Foundation/string.h> |
26 | #include <SDL_events.h> | ||
26 | 27 | ||
27 | #if defined (iPlatformApple) | 28 | #if defined (iPlatformApple) |
28 | # define reload_KeyShortcut SDLK_r, KMOD_PRIMARY | 29 | # define reload_KeyShortcut SDLK_r, KMOD_PRIMARY |
@@ -41,3 +42,17 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
41 | # define byWord_KeyModifier KMOD_CTRL | 42 | # define byWord_KeyModifier KMOD_CTRL |
42 | # define byLine_KeyModifier 0 | 43 | # define byLine_KeyModifier 0 |
43 | #endif | 44 | #endif |
45 | |||
46 | void init_Keys (void); | ||
47 | void deinit_Keys (void); | ||
48 | |||
49 | void load_Keys (const char *saveDir); | ||
50 | void save_Keys (const char *saveDir); | ||
51 | |||
52 | void bind_Keys (const char *command, int key, int mods); | ||
53 | void setLabel_Keys (const char *command, const char *label); | ||
54 | |||
55 | //const iString * label_Keys (const char *command); | ||
56 | //const char * shortcutLabel_Keys (const char *command); | ||
57 | |||
58 | iBool processEvent_Keys (const SDL_Event *); | ||