feat: add keyboard layout support
This commit is contained in:
@@ -415,8 +415,9 @@ static char ascii_lower(char c) {
|
||||
return (c >= 'A' && c <= 'Z') ? (char)(c + 32) : c;
|
||||
}
|
||||
|
||||
static bool is_printable_ascii(char c) {
|
||||
return c >= 32 && c < 127;
|
||||
static bool is_printable_byte(char c) {
|
||||
unsigned char value = (unsigned char)c;
|
||||
return value >= 32 && value != 127;
|
||||
}
|
||||
|
||||
static bool str_contains_case_insensitive(const char* text, const char* needle) {
|
||||
@@ -1448,7 +1449,7 @@ static bool handle_key(const montauk::abi::KeyEvent& key, bool& quit) {
|
||||
else g.filter_active = false;
|
||||
return true;
|
||||
}
|
||||
if (!key.ctrl && !key.alt && is_printable_ascii(key.ascii)) {
|
||||
if (!key.ctrl && !key.alt && is_printable_byte(key.ascii)) {
|
||||
append_filter_char(key.ascii);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user