36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
|
From fa0a5ea3996a09487924f072afa148d81bf6c53f Mon Sep 17 00:00:00 2001
|
||
|
From: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
|
||
|
Date: Tue, 11 Oct 2016 21:30:36 +0100
|
||
|
Subject: [PATCH 3/7] Endian fix for unicode keys (thanks jamessan)
|
||
|
|
||
|
---
|
||
|
termkey.c | 6 +++---
|
||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||
|
|
||
|
diff --git a/termkey.c b/termkey.c
|
||
|
index a88e6c2..b520b73 100644
|
||
|
--- a/termkey.c
|
||
|
+++ b/termkey.c
|
||
|
@@ -799,15 +799,15 @@ void termkey_canonicalise(TermKey *tk, TermKeyKey *key)
|
||
|
int flags = tk->canonflags;
|
||
|
|
||
|
if(flags & TERMKEY_CANON_SPACESYMBOL) {
|
||
|
- if(key->type == TERMKEY_TYPE_UNICODE && key->code.number == 0x20) {
|
||
|
+ if(key->type == TERMKEY_TYPE_UNICODE && key->code.codepoint == 0x20) {
|
||
|
key->type = TERMKEY_TYPE_KEYSYM;
|
||
|
key->code.sym = TERMKEY_SYM_SPACE;
|
||
|
}
|
||
|
}
|
||
|
else {
|
||
|
if(key->type == TERMKEY_TYPE_KEYSYM && key->code.sym == TERMKEY_SYM_SPACE) {
|
||
|
- key->type = TERMKEY_TYPE_UNICODE;
|
||
|
- key->code.number = 0x20;
|
||
|
+ key->type = TERMKEY_TYPE_UNICODE;
|
||
|
+ key->code.codepoint = 0x20;
|
||
|
fill_utf8(key);
|
||
|
}
|
||
|
}
|
||
|
--
|
||
|
2.11.0
|
||
|
|