feat: add keyboard layout support
This commit is contained in:
1 parent
86e3ebfe33
commit
821543238d
36 files changed
+1132
-125
No files matched your search
@@ -426,7 +426,8 @@ extern "C" void _start() {
|
||||
if (g_pathbar_cursor > 0) g_pathbar_cursor--;
|
||||
} else if (key.scancode == 0x4D) {
|
||||
if (g_pathbar_cursor < g_pathbar_len) g_pathbar_cursor++;
|
||||
} else if (key.ascii >= 32 && key.ascii < 127 && g_pathbar_len < 254) {
|
||||
} else if ((unsigned char)key.ascii >= 32
|
||||
&& (unsigned char)key.ascii != 127 && g_pathbar_len < 254) {
|
||||
for (int i = g_pathbar_len; i > g_pathbar_cursor; i--)
|
||||
g_pathbar_text[i] = g_pathbar_text[i - 1];
|
||||
g_pathbar_text[g_pathbar_cursor] = key.ascii;
|
||||
@@ -669,7 +670,8 @@ extern "C" void _start() {
|
||||
redraw = true;
|
||||
}
|
||||
// Printable character: start editing or insert
|
||||
else if (key.ascii >= 32 && key.ascii < 127 && !key.ctrl) {
|
||||
else if ((unsigned char)key.ascii >= 32
|
||||
&& (unsigned char)key.ascii != 127 && !key.ctrl) {
|
||||
if (!g_editing) {
|
||||
clear_selection();
|
||||
g_editing = true;
|
||||
|
||||
Reference in new issue
Block a user