aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-02-08 13:09:28 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-02-08 13:09:28 +0000
commit7ca8f85cd028825a4133a7cf16f70c059b54aa93 (patch)
tree563332d5876a967c6129b2868a29904e33445471 /input.c
parentterm: add term_font_size_{increase,decrease}() (diff)
input: hook ctrl+{plus/KP-Add/minus/KP-Subtract} to term_font_size_{increase,decrease}
Diffstat (limited to 'input.c')
-rw-r--r--input.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/input.c b/input.c
index 2a4322c9..bb225f0c 100644
--- a/input.c
+++ b/input.c
@@ -385,6 +385,18 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
}
}
+ else if (effective_mods == ctrl) {
+ if (sym == XKB_KEY_plus || sym == XKB_KEY_KP_Add) {
+ term_font_size_increase(term);
+ goto maybe_repeat;
+ }
+
+ else if (sym == XKB_KEY_minus || sym == XKB_KEY_KP_Subtract) {
+ term_font_size_decrease(term);
+ goto maybe_repeat;
+ }
+ }
+
else if (effective_mods == (shift | ctrl)) {
if (sym == XKB_KEY_C) {
selection_to_clipboard(term, serial);