key: assign certain keys to implicit kitty values
Kitty has implicit private area key values for certain keys. Let's just use those in our definitions as well Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
parent
93d9ead99c
commit
5df727f77d
1 changed files with 22 additions and 24 deletions
46
src/Key.zig
46
src/Key.zig
|
@ -37,12 +37,34 @@ pub const backspace: u21 = 0x7F;
|
||||||
|
|
||||||
// kitty encodes these keys directly in the private use area. We reuse those
|
// kitty encodes these keys directly in the private use area. We reuse those
|
||||||
// mappings
|
// mappings
|
||||||
|
pub const insert: u21 = 57348;
|
||||||
|
pub const delete: u21 = 57349;
|
||||||
|
pub const left: u21 = 57350;
|
||||||
|
pub const right: u21 = 57351;
|
||||||
|
pub const up: u21 = 57352;
|
||||||
|
pub const down: u21 = 57353;
|
||||||
|
pub const page_up: u21 = 57354;
|
||||||
|
pub const page_down: u21 = 57355;
|
||||||
|
pub const home: u21 = 57356;
|
||||||
|
pub const end: u21 = 57357;
|
||||||
pub const caps_lock: u21 = 57358;
|
pub const caps_lock: u21 = 57358;
|
||||||
pub const scroll_lock: u21 = 57359;
|
pub const scroll_lock: u21 = 57359;
|
||||||
pub const num_lock: u21 = 57360;
|
pub const num_lock: u21 = 57360;
|
||||||
pub const print_screen: u21 = 57361;
|
pub const print_screen: u21 = 57361;
|
||||||
pub const pause: u21 = 57362;
|
pub const pause: u21 = 57362;
|
||||||
pub const menu: u21 = 57363;
|
pub const menu: u21 = 57363;
|
||||||
|
pub const f1: u21 = 57364;
|
||||||
|
pub const f2: u21 = 57365;
|
||||||
|
pub const f3: u21 = 57366;
|
||||||
|
pub const f4: u21 = 57367;
|
||||||
|
pub const f5: u21 = 57368;
|
||||||
|
pub const f6: u21 = 57369;
|
||||||
|
pub const f7: u21 = 57370;
|
||||||
|
pub const f8: u21 = 57371;
|
||||||
|
pub const f9: u21 = 57372;
|
||||||
|
pub const f10: u21 = 57373;
|
||||||
|
pub const f11: u21 = 57374;
|
||||||
|
pub const f12: u21 = 57375;
|
||||||
pub const f13: u21 = 57376;
|
pub const f13: u21 = 57376;
|
||||||
pub const f14: u21 = 57377;
|
pub const f14: u21 = 57377;
|
||||||
pub const f15: u21 = 57378;
|
pub const f15: u21 = 57378;
|
||||||
|
@ -78,27 +100,3 @@ pub const kp_8: u21 = 57407;
|
||||||
pub const kp_9: u21 = 57408;
|
pub const kp_9: u21 = 57408;
|
||||||
pub const kp_begin: u21 = 57427;
|
pub const kp_begin: u21 = 57427;
|
||||||
// TODO: Finish the kitty keys
|
// TODO: Finish the kitty keys
|
||||||
|
|
||||||
const MAX_UNICODE: u21 = 1_114_112;
|
|
||||||
pub const f1: u21 = MAX_UNICODE + 1;
|
|
||||||
pub const f2: u21 = MAX_UNICODE + 2;
|
|
||||||
pub const f3: u21 = MAX_UNICODE + 3;
|
|
||||||
pub const f4: u21 = MAX_UNICODE + 4;
|
|
||||||
pub const f5: u21 = MAX_UNICODE + 5;
|
|
||||||
pub const f6: u21 = MAX_UNICODE + 6;
|
|
||||||
pub const f7: u21 = MAX_UNICODE + 7;
|
|
||||||
pub const f8: u21 = MAX_UNICODE + 8;
|
|
||||||
pub const f9: u21 = MAX_UNICODE + 9;
|
|
||||||
pub const f10: u21 = MAX_UNICODE + 10;
|
|
||||||
pub const f11: u21 = MAX_UNICODE + 11;
|
|
||||||
pub const f12: u21 = MAX_UNICODE + 12;
|
|
||||||
pub const up: u21 = MAX_UNICODE + 13;
|
|
||||||
pub const down: u21 = MAX_UNICODE + 14;
|
|
||||||
pub const right: u21 = MAX_UNICODE + 15;
|
|
||||||
pub const left: u21 = MAX_UNICODE + 16;
|
|
||||||
pub const page_up: u21 = MAX_UNICODE + 17;
|
|
||||||
pub const page_down: u21 = MAX_UNICODE + 18;
|
|
||||||
pub const home: u21 = MAX_UNICODE + 19;
|
|
||||||
pub const end: u21 = MAX_UNICODE + 20;
|
|
||||||
pub const insert: u21 = MAX_UNICODE + 21;
|
|
||||||
pub const delete: u21 = MAX_UNICODE + 22;
|
|
||||||
|
|
Loading…
Reference in a new issue