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
};
50
51
/* Default keybindings. */
52
#define NEKO_KEYS_MOD_WM_DEF {"WM_Mod", GP_KEY_LEFT_META}
53
#define NEKO_KEYS_QUIT_DEF {"App_Quit", GP_KEY_Q}
54
#define NEKO_KEYS_EXIT_DEF {"WM_Exit", GP_KEY_X}
55
#define NEKO_KEYS_FORCE_DEF {"WM_Force", GP_KEY_F}
56
#define NEKO_KEYS_LIST_APPS_DEF {"List_Apps", GP_KEY_L}
57
#define NEKO_KEYS_APP_LAUNCHER_DEF {"App_Launcher", GP_KEY_A}
58
#define NEKO_KEYS_SWITCH_FOCUS_DEF {"Switch_Focus", GP_KEY_TAB}
59
#define NEKO_KEYS_VIRT_SCREENS_LEFT_DEF {"View_Left", GP_KEY_LEFT}
60
#define NEKO_KEYS_VIRT_SCREENS_RIGHT_DEF {"View_Right", GP_KEY_RIGHT}
61
#define NEKO_KEYS_ROTATE_DEF {"Rotate_Screen", GP_KEY_R}
62
#define NEKO_KEYS_HELP_DEF {"Help", GP_KEY_H}
63
65
#define NEKO_KEYS_MOD_WM neko_keybindings[NEKO_KEYS_MOD_WM_IDX].key
66
68
#define NEKO_KEYS_QUIT neko_keybindings[NEKO_KEYS_QUIT_IDX].key
69
71
#define NEKO_KEYS_EXIT neko_keybindings[NEKO_KEYS_EXIT_IDX].key
72
74
#define NEKO_KEYS_FORCE neko_keybindings[NEKO_KEYS_FORCE_IDX].key
75
77
#define NEKO_KEYS_LIST_APPS neko_keybindings[NEKO_KEYS_LIST_APPS_IDX].key
78
80
#define NEKO_KEYS_APP_LAUNCHER neko_keybindings[NEKO_KEYS_APP_LAUNCHER_IDX].key
81
83
#define NEKO_KEYS_SWITCH_FOCUS neko_keybindings[NEKO_KEYS_SWITCH_FOCUS_IDX].key
84
86
#define NEKO_KEYS_VIRT_SCREENS_LEFT neko_keybindings[NEKO_KEYS_VIRT_SCREENS_LEFT_IDX].key
87
89
#define NEKO_KEYS_VIRT_SCREENS_RIGHT neko_keybindings[NEKO_KEYS_VIRT_SCREENS_RIGHT_IDX].key
90
92
#define NEKO_KEYS_ROTATE neko_keybindings[NEKO_KEYS_ROTATE_IDX].key
93
95
#define NEKO_KEYS_HELP neko_keybindings[NEKO_KEYS_HELP_IDX].key
96
100
void
neko_load_keybindings
(
void
);
101
102
#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