commit 1bbeb8861e0a61c0d7ee5c6d20283e2391b811da
parent 31f209bcd5739cd3e1df8d3b53c7853b8594f3b2
Author: Maarten van Gompel <proycon@anaproy.nl>
Date: Sun, 31 Oct 2021 19:41:56 +0100
added simple navigation layer
Diffstat:
2 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -21,14 +21,14 @@ struct clr_scheme scheme1 = {
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id layers[] = {
Full, // First layout is the default layout on startup
- Special, Emoji, Simple, SimpleGrid, Cyrillic, Arabic,
+ Special, Emoji, Simple, SimpleGrid, Nav, Cyrillic, Arabic,
NumLayouts // signals the last item, may not be omitted
};
/* layers is an ordered list of layouts, used to cycle through */
static enum layout_id landscape_layers[] = {
Landscape, // First layout is the default layout on startup
- Special, Emoji,
+ Special, Emoji, Nav,
NumLayouts // signals the last item, may not be omitted
};
diff --git a/layout.mobintl.h b/layout.mobintl.h
@@ -21,6 +21,7 @@ enum layout_id {
Cyrillic,
Arabic,
Emoji,
+ Nav,
Landscape,
ComposeA,
ComposeE,
@@ -64,7 +65,7 @@ enum layout_id {
};
static struct key keys_full[], keys_special[], keys_simple[], keys_simplegrid[],
- keys_cyrillic[], keys_arabic[], keys_emoji[], keys_landscape[],
+ keys_cyrillic[], keys_arabic[], keys_emoji[], keys_nav[], keys_landscape[],
keys_compose_a[], keys_compose_e[], keys_compose_y[], keys_compose_u[],
keys_compose_i[], keys_compose_o[], keys_compose_w[], keys_compose_r[],
keys_compose_t[], keys_compose_p[], keys_compose_s[], keys_compose_d[],
@@ -86,6 +87,7 @@ static struct layout layouts[NumLayouts] = {
[Cyrillic] = {keys_cyrillic, "cyrillic", "cyrillic"},
[Arabic] = {keys_arabic, "arabic", "arabic"},
[Emoji] = {keys_emoji, "latin", "emoji"},
+ [Nav] = {keys_nav, "latin", "nav"},
[Landscape] = {keys_landscape, "latin", "landscape"},
[ComposeA] = {keys_compose_a, "latin"},
[ComposeE] = {keys_compose_e, "latin"},
@@ -726,6 +728,26 @@ static struct key keys_emoji[] = {
{"", "", 0.0, Last},
};
+static struct key keys_nav[] = {
+ {"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme = 1},
+ {"", "", 1.0, Code, KEY_SPACE, .scheme = 1},
+ {"↑", "↑", 1.0, Code, KEY_UP, .scheme = 1},
+ {"⇈", "⇈", 1.0, Code, KEY_PAGEUP, .scheme = 1},
+ {"", "", 0.0, EndRow},
+
+ {"q", "q", 1.0, Code, KEY_Q, .scheme = 1},
+ {"←", "←", 1.0, Code, KEY_LEFT, .scheme = 1},
+ {"Enter", "Enter", 1.0, Code, KEY_ENTER, .scheme = 1},
+ {"→", "→", 1.0, Code, KEY_RIGHT, .scheme = 1},
+ {"", "", 0.0, EndRow},
+
+ {"⌫", "⌫", 1.0, Code, KEY_BACKSPACE, .scheme = 1},
+ {"", "", 1.0, Code, KEY_SPACE, .scheme = 1},
+ {"↓", "↓", 1.0, Code, KEY_DOWN, .scheme = 1},
+ {"⇊", "⇊", 1.0, Code, KEY_PAGEDOWN, .scheme = 1},
+ {"", "", 0.0, Last},
+};
+
static struct key keys_landscape[] = {
{"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme = 1},
{"q", "Q", 1.0, Code, KEY_Q, &layouts[Emoji]},