feat: switch text to UTF-8; add Unicode key events, dead keys & Czech layout; fix numpad navigation; add NumLock support
This commit is contained in:
1 parent
32660ddd1a
commit
2aa6360b3d
101 files changed
+3733
-1639
No files matched your search
@@ -400,6 +400,7 @@ static void fit_text(char* out, int outCap, const char* text, int maxWidth) {
|
||||
if (text_width(out) + text_width(ellipsis) > maxWidth) break;
|
||||
len++;
|
||||
}
|
||||
len = montauk::utf8::floor_boundary(text, montauk::slen(text), len);
|
||||
out[len++] = '.';
|
||||
out[len++] = '.';
|
||||
out[len++] = '.';
|
||||
@@ -798,8 +799,8 @@ static bool handle_key(const montauk::abi::KeyEvent& key) {
|
||||
return true;
|
||||
}
|
||||
int current = *selected_for_tab();
|
||||
if (key.scancode == 0x48) { select_index(current - 1); return true; } // Up
|
||||
if (key.scancode == 0x50) { select_index(current + 1); return true; } // Down
|
||||
if (montauk::nav_scancode(key) == 0x48) { select_index(current - 1); return true; } // Up
|
||||
if (montauk::nav_scancode(key) == 0x50) { select_index(current + 1); return true; } // Down
|
||||
if (key.ascii == 'r' || key.ascii == 'R') {
|
||||
reload();
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user