aboutsummaryrefslogtreecommitdiffstats
path: root/surfaces/input.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-09-27 20:03:30 +0100
committereunhhu <[email protected]>2026-09-27 20:03:30 +0100
commit7b93a66dbffaf2b20b0a1925786f56db54066c9b (patch)
tree000f214ae6743dcc3d6e861fc2a27b49d875ee2d /surfaces/input.c
parentc20c8fa13c77d08d093aede126a1ec7646da0905 (diff)
downloadvega-7b93a66dbffaf2b20b0a1925786f56db54066c9b.tar.gz
vega-7b93a66dbffaf2b20b0a1925786f56db54066c9b.zip
Type Hangul on the keyboard (두벌식)
Surfaces that read keys (the display, through evdev) had only a US layout's letters. After the 한/영 key (Lang1, or AltRight standing for it), letter keys now give jamo that compose syllables in the entry line (surfaces/hangul.c): an initial, a vowel and an optional final, joined vowels and finals, a final that moves on to a vowel after it (도깨비불), Shift's doubled consonants, a lone jamo as its compatibility letter. The syllable being composed shows after the entry line; Backspace takes it back a jamo at a time before deleting what was typed; Enter, Tab, the toggle or any key but a letter finishes it. The script language gains hangul, letters HEX and back to drive it. The check types ten cases through it (안녕하세요, 값을, 안자, 와원, 까원, 갑 after Backspace, 한글, ㅏ, 안ㅈ, 안녕 2) and follows the composing line jamo by jamo; the messenger check has Alice type 안녕 on her display with recorded keys, drawn on Bob's.
Diffstat (limited to 'surfaces/input.c')
-rw-r--r--surfaces/input.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/surfaces/input.c b/surfaces/input.c
index 9403a75..e13693d 100644
--- a/surfaces/input.c
+++ b/surfaces/input.c
@@ -52,6 +52,7 @@ static const struct { unsigned short code; const char *name; char plain, shifted
{KEY_HOME, "Home", 0, 0}, {KEY_UP, "ArrowUp", 0, 0}, {KEY_PAGEUP, "PageUp", 0, 0}, {KEY_LEFT, "ArrowLeft", 0, 0},
{KEY_RIGHT, "ArrowRight", 0, 0}, {KEY_END, "End", 0, 0}, {KEY_DOWN, "ArrowDown", 0, 0},
{KEY_PAGEDOWN, "PageDown", 0, 0}, {KEY_INSERT, "Insert", 0, 0}, {KEY_DELETE, "Delete", 0, 0},
+ {KEY_HANGEUL, "Lang1", 0, 0}, {KEY_RIGHTALT, "AltRight", 0, 0}, /* 한/영, or the right Alt that stands for it */
};
static bool has(int fd, unsigned type, unsigned code) {