wvkbd

git clone https://git.tarina.org/wvkbd
Log | Files | Refs | README | LICENSE

commit f59f814c97a67013624d430109f6b7505ba764df
parent 20b2dc61c331b48e6d3beb7f40259a12997ead96
Author: Maarten van Gompel <proycon@anaproy.nl>
Date:   Mon, 23 Aug 2021 22:35:14 +0200

added support for an additional colour scheme

Diffstat:
Mkeyboard.h | 7+++++--
Mlayout.mobile.h | 342++++++++++++++++++++++++++++++++++++++++---------------------------------------
2 files changed, 180 insertions(+), 169 deletions(-)

diff --git a/keyboard.h b/keyboard.h @@ -48,6 +48,7 @@ struct key { * XKB keycodes are +8 */ struct layout *layout; //pointer back to the parent layout that holds this key const uint32_t code_mod; /* modifier to force when this key is pressed */ + uint8_t scheme; //index of the scheme to use bool reset_mod; /* reset modifiers when clicked */ //actual coordinates on the surface (pixels), will be computed automatically for all keys @@ -64,6 +65,7 @@ struct kbd { struct layout *layout; struct layout *prevlayout; struct clr_scheme scheme; + struct clr_scheme scheme1; uint32_t w, h; uint8_t mods; @@ -258,11 +260,12 @@ kbd_draw_key(struct kbd *kb, struct key *k, bool pressed) { struct drwsurf *d = kb->surf; const char *label = (kb->mods & Shift) ? k->shift_label : k->label; fprintf(stderr, "Draw key +%d+%d %dx%d -> %s\n", k->x, k->y, k->w, k->h, k->label); - Color *fill = pressed ? &kb->scheme.high : &kb->scheme.fg; + struct clr_scheme * scheme = (k->scheme == 0) ? &(kb->scheme) : &(kb->scheme1); + Color *fill = pressed ? &scheme->high : &scheme->fg; draw_inset(d, k->x, k->y, k->w, k->h, KBD_KEY_BORDER, fill->color); uint32_t xoffset = k->w / (strlen(label) + 2); fprintf(stderr, " xoffset=%d\n", xoffset); - wld_draw_text(d->render, d->ctx->font, kb->scheme.text.color, + wld_draw_text(d->render, d->ctx->font, scheme->text.color, k->x + xoffset, k->y + (k->h / 2), label, -1, NULL); } diff --git a/layout.mobile.h b/layout.mobile.h @@ -127,6 +127,14 @@ static struct kbd keyboard = { .high = {.bgra = {100, 100, 100, 225}}, .text = {.color = UINT32_MAX}, }, + .scheme1 = + { + /* colors */ + .bg = {.bgra = {15, 15, 15, 225}}, + .fg = {.bgra = {32, 32, 32, 225}}, + .high = {.bgra = {100, 100, 100, 225}}, + .text = {.color = UINT32_MAX}, + }, }; /* key layouts @@ -158,16 +166,16 @@ static struct kbd keyboard = { * - layout: layout to switch to when key is pressed */ static struct key keys_full[] = { - {"Esc", "Esc", 1.0, Code, KEY_ESC}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, - {"Tab", "Tab", 1.0, Code, KEY_TAB}, - {"↑", "↑", 1.0, Code, KEY_UP}, - {"↓", "↓", 1.0, Code, KEY_DOWN}, - {"←", "←", 1.0, Code, KEY_LEFT}, - {"→", "→", 1.0, Code, KEY_RIGHT}, - {"'", "\"", 1.0, Code, KEY_APOSTROPHE}, - {";", ":", 1.0, Code, KEY_SEMICOLON}, - {"/", "?", 1.0, Code, KEY_SLASH}, + {"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, + {"Tab", "Tab", 1.0, Code, KEY_TAB, .scheme=1}, + {"↑", "↑", 1.0, Code, KEY_UP, .scheme=1}, + {"↓", "↓", 1.0, Code, KEY_DOWN, .scheme=1}, + {"←", "←", 1.0, Code, KEY_LEFT, .scheme=1}, + {"→", "→", 1.0, Code, KEY_RIGHT, .scheme=1}, + {"'", "\"", 1.0, Code, KEY_APOSTROPHE, .scheme=1}, + {";", ":", 1.0, Code, KEY_SEMICOLON, .scheme=1}, + {"/", "?", 1.0, Code, KEY_SLASH, .scheme=1}, {"", "", 0.0, EndRow}, {"1", "!", 1.0, Code, KEY_1}, @@ -197,7 +205,7 @@ static struct key keys_full[] = { {"p", "P", 1.0, Code, KEY_P, &layouts[ComposeP]}, {"", "", 0.0, EndRow}, - {"Cmp", "Cmp", 1.0, Compose}, + {"Cmp", "Cmp", 1.0, Compose, .scheme=1}, {"a", "A", 1.0, Code, KEY_A, &layouts[ComposeA]}, {"s", "S", 1.0, Code, KEY_S, &layouts[ComposeS]}, {"d", "D", 1.0, Code, KEY_D, &layouts[ComposeD]}, @@ -210,7 +218,7 @@ static struct key keys_full[] = { {"", "", 0.5, Pad}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"z", "Z", 1.0, Code, KEY_Z, &layouts[ComposeZ]}, {"x", "X", 1.0, Code, KEY_X, &layouts[ComposeX]}, {"c", "C", 1.0, Code, KEY_C, &layouts[ComposeC]}, @@ -218,15 +226,15 @@ static struct key keys_full[] = { {"b", "B", 1.0, Code, KEY_B, &layouts[ComposeB]}, {"n", "N", 1.0, Code, KEY_N, &layouts[ComposeN]}, {"m", "M", 1.0, Code, KEY_M, &layouts[ComposeM]}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Sym", "Sym", 1.0, Layout, 0, &layouts[Special]}, - {"Alt", "Alt", 1.0, Mod, Alt}, + {"Sym", "Sym", 1.0, Layout, 0, &layouts[Special], .scheme=1}, + {"Alt", "Alt", 1.0, Mod, Alt, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Entr", "Entr", 2.0, Code, KEY_ENTER}, + {"Entr", "Entr", 2.0, Code, KEY_ENTER, .scheme=1}, /* end of layout */ @@ -234,17 +242,17 @@ static struct key keys_full[] = { }; static struct key keys_special[] = { - {"Esc", "Esc", 1.0, Code, KEY_ESC}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, - {"Tab", "Tab", 1.0, Code, KEY_TAB}, - {"↑", "↑", 1.0, Code, KEY_UP}, - {"↓", "↓", 1.0, Code, KEY_DOWN}, - {"←", "←", 1.0, Code, KEY_LEFT}, - {"→", "→", 1.0, Code, KEY_RIGHT}, - {"⇈", "⇈", 1.0, Code, KEY_PAGEUP}, - {"⇊", "⇊", 1.0, Code, KEY_PAGEDOWN}, - {"⇤", "⇤", 1.0, Code, KEY_HOME}, - {"⇥", "⇥", 1.0, Code, KEY_END}, + {"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, + {"Tab", "Tab", 1.0, Code, KEY_TAB, .scheme=1}, + {"↑", "↑", 1.0, Code, KEY_UP, .scheme=1}, + {"↓", "↓", 1.0, Code, KEY_DOWN, .scheme=1}, + {"←", "←", 1.0, Code, KEY_LEFT, .scheme=1}, + {"→", "→", 1.0, Code, KEY_RIGHT, .scheme=1}, + {"⇈", "⇈", 1.0, Code, KEY_PAGEUP, .scheme=1}, + {"⇊", "⇊", 1.0, Code, KEY_PAGEDOWN, .scheme=1}, + {"⇤", "⇤", 1.0, Code, KEY_HOME, .scheme=1}, + {"⇥", "⇥", 1.0, Code, KEY_END, .scheme=1}, {"", "", 0.0, EndRow}, {"1", "!", 1.0, Code, KEY_1}, @@ -259,8 +267,8 @@ static struct key keys_special[] = { {"0", ")", 1.0, Code, KEY_0}, {"", "", 0.0, EndRow}, - {"Caps", "Caps", 1.0, Mod, CapsLock}, - {"Sup", "Sup", 1.0, Mod, Super}, + {"Caps", "Caps", 1.0, Mod, CapsLock, .scheme=1}, + {"Sup", "Sup", 1.0, Mod, Super, .scheme=1}, {"`", "~", 1.0, Code, KEY_GRAVE}, {"'", "\"", 1.0, Code, KEY_APOSTROPHE}, {"-", "_", 1.0, Code, KEY_MINUS}, @@ -268,26 +276,26 @@ static struct key keys_special[] = { {"[", "{", 1.0, Code, KEY_LEFTBRACE}, {"]", "}", 1.0, Code, KEY_RIGHTBRACE}, {"\\", "|", 1.0, Code, KEY_BACKSLASH}, - {"Del", "Del", 1.0, Code, KEY_DELETE}, + {"Del", "Del", 1.0, Code, KEY_DELETE, .scheme=1}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 2.0, Mod, Shift}, + {"⇧", "⇧", 2.0, Mod, Shift, .scheme=1}, {";", ":", 1.0, Code, KEY_SEMICOLON}, {"/", "?", 1.0, Code, KEY_SLASH}, {"<", "«", 1.0, Code, KEY_COMMA, 0, AltGr}, {">", "»", 1.0, Code, KEY_DOT, 0, AltGr}, {"¡", "¿", 1.0, Code, KEY_MENU}, {"", "", 1.0, Pad}, - {"AGr", "AGr", 1.0, Mod, AltGr}, - {"⌫", "⌫", 1.0, Code, KEY_BACKSPACE}, + {"AGr", "AGr", 1.0, Mod, AltGr, .scheme=1}, + {"⌫", "⌫", 1.0, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Simple) ? Full : Simple] }, - {"Alt", "Alt", 1.0, Mod, Alt}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Simple) ? Full : Simple] , .scheme=1}, + {"Alt", "Alt", 1.0, Mod, Alt, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Entr", "Entr", 2.0, Code, KEY_ENTER}, + {"Entr", "Entr", 2.0, Code, KEY_ENTER, .scheme=1}, /* end of layout */ {"", "", 0.0, Last}, @@ -307,7 +315,7 @@ static struct key keys_simple[] = { {"p", "P", 1.0, Code, KEY_P, &layouts[ComposeP]}, {"", "", 0.0, EndRow}, - {"Cmp", "Cmp", 1.0, Compose}, + {"Cmp", "Cmp", 1.0, Compose, .scheme=1}, {"a", "A", 1.0, Code, KEY_A, &layouts[ComposeA]}, {"s", "S", 1.0, Code, KEY_S, &layouts[ComposeS]}, {"d", "D", 1.0, Code, KEY_D, &layouts[ComposeD]}, @@ -320,7 +328,7 @@ static struct key keys_simple[] = { {"", "", 0.5, Pad}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"z", "Z", 1.0, Code, KEY_Z, &layouts[ComposeZ]}, {"x", "X", 1.0, Code, KEY_X, &layouts[ComposeX]}, {"c", "C", 1.0, Code, KEY_C, &layouts[ComposeC]}, @@ -328,15 +336,15 @@ static struct key keys_simple[] = { {"b", "B", 1.0, Code, KEY_B, &layouts[ComposeB]}, {"n", "N", 1.0, Code, KEY_N, &layouts[ComposeN]}, {"m", "M", 1.0, Code, KEY_M, &layouts[ComposeM]}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Simple) ? Special : Cyrillic] }, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Simple) ? Special : Cyrillic], .scheme=1 }, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Entr", "Entr", 2.0, Code, KEY_ENTER}, + {"Entr", "Entr", 2.0, Code, KEY_ENTER, .scheme=1}, /* end of layout */ @@ -385,7 +393,7 @@ static struct key keys_cyrillic[] = { {"ж", "Ж", 1.0, Code, KEY_SEMICOLON}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"я", "Я", 1.0, Code, KEY_Z}, {"ч", "Ч", 1.0, Code, KEY_X}, {"c", "С", 1.0, Code, KEY_C}, @@ -394,16 +402,16 @@ static struct key keys_cyrillic[] = { {"т", "Т", 1.0, Code, KEY_N}, {"ь", "Ь", 1.0, Code, KEY_M}, {"б", "Б", 1.0, Code, KEY_COMMA}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Cyrillic) ? Full : DefaultLayout] }, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[(DefaultLayout == Cyrillic) ? Full : DefaultLayout] , .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_EQUAL}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_SLASH}, - {"Entr", "Entr", 2.0, Code, KEY_ENTER}, + {"Entr", "Entr", 2.0, Code, KEY_ENTER, .scheme=1}, /* end of layout */ @@ -425,16 +433,16 @@ static struct key keys_compose_a[] = { {"α", "Α", 1.0, Copy, 0x03B1, 0, 0x0391}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -474,16 +482,16 @@ static struct key keys_compose_y[] = { {"", "", 0.0, EndRow}, {"υ", "Υ", 1.0, Copy, 0x03C5, 0, 0x03A5}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -502,16 +510,16 @@ static struct key keys_compose_u[] = { {"υ", "Υ", 1.0, Copy, 0x03C5, 0, 0x03A5}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -530,16 +538,16 @@ static struct key keys_compose_o[] = { {"ω", "Ο", 1.0, Copy, 0x03C9, 0, 0x03A9}, {"", "", 8.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -559,16 +567,16 @@ static struct key keys_compose_i[] = { {"η", "Η", 1.0, Copy, 0x03B7, 0, 0x0397}, {"", "", 8.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -619,16 +627,16 @@ static struct key keys_compose_w[] = { {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -641,16 +649,16 @@ static struct key keys_compose_r[] = { {"ρ", "Ρ", 1.0, Copy, 0x03C1, 0, 0x03A1}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -665,16 +673,16 @@ static struct key keys_compose_t[] = { {"θ", "Θ", 1.0, Copy, 0x03B8, 0, 0x0398}, {"", "", 8.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -684,16 +692,16 @@ static struct key keys_compose_p[] = { {"π", "Π", 1.0, Copy, 0x03C0, 0, 0x03A0}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -710,16 +718,16 @@ static struct key keys_compose_s[] = { {"ς", "Σ", 1.0, Copy, 0x03C2, 0, 0x03A3}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -732,16 +740,16 @@ static struct key keys_compose_d[] = { {"δ", "Δ", 1.0, Copy, 0x03B4, 0, 0x0394}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -751,16 +759,16 @@ static struct key keys_compose_f[] = { {"φ", "Φ", 1.0, Copy, 0x03C6, 0, 0x03A6}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -772,16 +780,16 @@ static struct key keys_compose_g[] = { {"γ", "Γ", 1.0, Copy, 0x03B3, 0, 0x0393}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -793,16 +801,16 @@ static struct key keys_compose_h[] = { {"η", "Η", 1.0, Copy, 0x03B7, 0, 0x0397}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -812,16 +820,16 @@ static struct key keys_compose_j[] = { {"", "", 0.0, EndRow}, {"", "", 10.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -833,16 +841,16 @@ static struct key keys_compose_k[] = { {"κ", "Κ", 1.0, Copy, 0x03BA, 0, 0x039A}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -855,16 +863,16 @@ static struct key keys_compose_l[] = { {"λ", "Λ", 1.0, Copy, 0x03BB, 0, 0x039B}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -877,16 +885,16 @@ static struct key keys_compose_z[] = { {"ζ", "Ζ", 1.0, Copy, 0x03B6, 0, 0x0396}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -897,16 +905,16 @@ static struct key keys_compose_x[] = { {"ξ", "Ξ", 1.0, Copy, 0x03BE, 0, 0x039E}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -921,16 +929,16 @@ static struct key keys_compose_c[] = { {"χ", "Χ", 1.0, Copy, 0x03C7, 0, 0x03A7}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -939,16 +947,16 @@ static struct key keys_compose_v[] = { {"", "", 0.0, EndRow}, {"", "", 10.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -958,16 +966,16 @@ static struct key keys_compose_b[] = { {"β", "Β", 1.0, Copy, 0x03B2, 0, 0x0392}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -982,16 +990,16 @@ static struct key keys_compose_n[] = { {"ν", "Ν", 1.0, Copy, 0x03BD, 0, 0x039D}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, }; @@ -1001,15 +1009,15 @@ static struct key keys_compose_m[] = { {"μ", "Μ", 1.0, Copy, 0x03BC, 0, 0x039C}, {"", "", 9.0, Pad }, {"", "", 0.0, EndRow}, - {"⇧", "⇧", 1.5, Mod, Shift}, + {"⇧", "⇧", 1.5, Mod, Shift, .scheme=1}, {"", "", 7, Pad}, - {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE}, + {"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme=1}, {"", "", 0.0, EndRow}, - {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout]}, - {"Ctr", "Ctr", 1.0, Mod, Ctrl}, + {"Abc", "Abc", 1.0, Layout, 0, &layouts[DefaultLayout], .scheme=1}, + {"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme=1}, {",", "'", 1.0, Code, KEY_COMMA}, {"", "", 4.0, Code, KEY_SPACE}, {".", "?", 1.0, Code, KEY_DOT}, - {"Enter", "Enter", 2.0, Code, KEY_ENTER}, + {"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme=1}, {"", "", 0.0, Last}, };