-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunimap_macro.h
More file actions
48 lines (43 loc) · 1.34 KB
/
unimap_macro.h
File metadata and controls
48 lines (43 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* path: /home/klassiker/.local/share/repos/zenith-xt-usb/unimap_macro.h
* author: klassiker [mrdotx]
* url: https://github.com/mrdotx/zenith-xt-usb
* date: 2025-08-14T03:49:53+0200
*/
/* general config */
#define C_INTERVAL I(15)
#define C_WAIT W(255)
/* increase terminal font size */
#define O_INCREASETERMINALFONTSIZE C_INTERVAL, \
D(LCTL), D(LSFT), \
T(EQL), T(EQL), T(EQL), T(EQL), \
U(LSFT), U(LCTL), C_WAIT
/* decrease terminal font size */
#define O_DECREASETERMINALFONTSIZE C_INTERVAL, \
D(LCTL), \
T(MINS), T(MINS), T(MINS), T(MINS), \
U(LCTL), C_WAIT
#define AC_ITFS ACTION_MACRO(INCREASETERMINALFONTSIZE)
#define AC_DTFS ACTION_MACRO(DECREASETERMINALFONTSIZE)
enum macro_id {
INCREASETERMINALFONTSIZE,
DECREASETERMINALFONTSIZE,
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case INCREASETERMINALFONTSIZE:
return (record->event.pressed ?
MACRO( \
O_INCREASETERMINALFONTSIZE, \
END ) :
MACRO_NONE );
case DECREASETERMINALFONTSIZE:
return (record->event.pressed ?
MACRO( \
O_DECREASETERMINALFONTSIZE, \
END ) :
MACRO_NONE );
}
return MACRO_NONE;
}