diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-09 19:59:06 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-09 19:59:06 +0300 |
commit | 4ab25def835077e04cf6df19f4aadc7a2e9dc0d7 (patch) | |
tree | 670ff7734938c2dd9f5160638b72ad20852c24e9 /src/ui/keys.h | |
parent | f0c3134aebd83de1712a66d59af9f2d414110f11 (diff) |
Added header file for keyboard shortcuts
Diffstat (limited to 'src/ui/keys.h')
-rw-r--r-- | src/ui/keys.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/ui/keys.h b/src/ui/keys.h new file mode 100644 index 00000000..cf6aad04 --- /dev/null +++ b/src/ui/keys.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* Copyright 2020 Jaakko Keränen <jaakko.keranen@iki.fi> | ||
2 | |||
3 | Redistribution and use in source and binary forms, with or without | ||
4 | modification, are permitted provided that the following conditions are met: | ||
5 | |||
6 | 1. Redistributions of source code must retain the above copyright notice, this | ||
7 | list of conditions and the following disclaimer. | ||
8 | 2. Redistributions in binary form must reproduce the above copyright notice, | ||
9 | this list of conditions and the following disclaimer in the documentation | ||
10 | and/or other materials provided with the distribution. | ||
11 | |||
12 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
13 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
14 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
15 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
16 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
17 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
18 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
19 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
20 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
21 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | ||
22 | |||
23 | #pragma once | ||
24 | |||
25 | #include <the_Foundation/defs.h> | ||
26 | |||
27 | #if defined (iPlatformApple) | ||
28 | # define prevTab_KeyShortcut SDLK_LEFTBRACKET, KMOD_SHIFT | KMOD_PRIMARY | ||
29 | # define nextTab_KeyShortcut SDLK_RIGHTBRACKET, KMOD_SHIFT | KMOD_PRIMARY | ||
30 | # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_PRIMARY | ||
31 | # define navigateForward_KeyShortcut SDLK_RIGHT, KMOD_PRIMARY | ||
32 | #else | ||
33 | # define prevTab_KeyShortcut SDLK_PAGEUP, KMOD_PRIMARY | ||
34 | # define nextTab_KeyShortcut SDLK_PAGEDOWN, KMOD_PRIMARY | ||
35 | # define navigateBack_KeyShortcut SDLK_LEFT, KMOD_ALT | ||
36 | # define navigateForward_KeyShortcut SDLK_RIGHT, KMOD_ALT | ||
37 | #endif | ||