NekoWM
A gfxprim proxy backend tiling window manager
Loading...
Searching...
No Matches
neko_keybindings.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: GPL-2.0-or-later
2
/*
3
4
Copyright (c) 2019-2025 Cyril Hrubis <metan@ucw.cz>
5
6
*/
7
13
#ifndef NEKO_KEYBINDINGS_H
14
#define NEKO_KEYBINDINGS_H
15
16
#include <stdint.h>
17
#include <input/gp_event_keys.h>
18
20
struct
neko_keybinding
{
26
const
char
*
name
;
30
uint32_t
key
;
31
};
32
34
extern
struct
neko_keybinding
neko_keybindings
[];
35
37
enum
neko_keybindings_idx
{
38
NEKO_KEYS_MOD_WM_IDX,
39
NEKO_KEYS_QUIT_IDX,
40
NEKO_KEYS_EXIT_IDX,
41
NEKO_KEYS_FORCE_IDX,
42
NEKO_KEYS_LIST_APPS_IDX,
43
NEKO_KEYS_APP_LAUNCHER_IDX,
44
NEKO_KEYS_SWITCH_FOCUS_IDX,
45
NEKO_KEYS_VIRT_SCREENS_LEFT_IDX,
46
NEKO_KEYS_VIRT_SCREENS_RIGHT_IDX,
47
NEKO_KEYS_ROTATE_IDX,
48
NEKO_KEYS_HELP_IDX,
49
NEKO_KEYS_POWEROFF_IDX,
50
};
51
52
/* Default keybindings. */
53
#define NEKO_KEYS_MOD_WM_DEF {"WM_Mod", GP_KEY_LEFT_META}
54
#define NEKO_KEYS_QUIT_DEF {"App_Quit", GP_KEY_Q}
55
#define NEKO_KEYS_EXIT_DEF {"WM_Exit", GP_KEY_X}
56
#define NEKO_KEYS_FORCE_DEF {"WM_Force", GP_KEY_F}
57
#define NEKO_KEYS_LIST_APPS_DEF {"List_Apps", GP_KEY_L}
58
#define NEKO_KEYS_APP_LAUNCHER_DEF {"App_Launcher", GP_KEY_A}
59
#define NEKO_KEYS_SWITCH_FOCUS_DEF {"Switch_Focus", GP_KEY_TAB}
60
#define NEKO_KEYS_VIRT_SCREENS_LEFT_DEF {"View_Left", GP_KEY_LEFT}
61
#define NEKO_KEYS_VIRT_SCREENS_RIGHT_DEF {"View_Right", GP_KEY_RIGHT}
62
#define NEKO_KEYS_ROTATE_DEF {"Rotate_Screen", GP_KEY_R}
63
#define NEKO_KEYS_HELP_DEF {"Help", GP_KEY_H}
64
#define NEKO_KEYS_POWEROFF_DEF {"Power_Off", GP_KEY_P}
65
67
#define NEKO_KEYS_MOD_WM neko_keybindings[NEKO_KEYS_MOD_WM_IDX].key
68
70
#define NEKO_KEYS_QUIT neko_keybindings[NEKO_KEYS_QUIT_IDX].key
71
73
#define NEKO_KEYS_EXIT neko_keybindings[NEKO_KEYS_EXIT_IDX].key
74
76
#define NEKO_KEYS_FORCE neko_keybindings[NEKO_KEYS_FORCE_IDX].key
77
79
#define NEKO_KEYS_LIST_APPS neko_keybindings[NEKO_KEYS_LIST_APPS_IDX].key
80
82
#define NEKO_KEYS_APP_LAUNCHER neko_keybindings[NEKO_KEYS_APP_LAUNCHER_IDX].key
83
85
#define NEKO_KEYS_SWITCH_FOCUS neko_keybindings[NEKO_KEYS_SWITCH_FOCUS_IDX].key
86
88
#define NEKO_KEYS_VIRT_SCREENS_LEFT neko_keybindings[NEKO_KEYS_VIRT_SCREENS_LEFT_IDX].key
89
91
#define NEKO_KEYS_VIRT_SCREENS_RIGHT neko_keybindings[NEKO_KEYS_VIRT_SCREENS_RIGHT_IDX].key
92
94
#define NEKO_KEYS_ROTATE neko_keybindings[NEKO_KEYS_ROTATE_IDX].key
95
97
#define NEKO_KEYS_HELP neko_keybindings[NEKO_KEYS_HELP_IDX].key
98
100
#define NEKO_KEYS_POWEROFF neko_keybindings[NEKO_KEYS_POWEROFF_IDX].key
101
105
void
neko_load_keybindings
(
void
);
106
107
#endif
/* NEKO_KEYBINDINGS_H */
neko_keybindings_idx
neko_keybindings_idx
Indexes into neko_keybindings array.
Definition
neko_keybindings.h:37
neko_load_keybindings
void neko_load_keybindings(void)
Loads keybindings from a file.
neko_keybindings
struct neko_keybinding neko_keybindings[]
Array to store the keybindings to.
neko_keybinding
Keybinding.
Definition
neko_keybindings.h:20
neko_keybinding::name
const char * name
A key name.
Definition
neko_keybindings.h:26
neko_keybinding::key
uint32_t key
A key value.
Definition
neko_keybindings.h:30
Generated by
1.9.8