From 6a28cf6fb30f96d540b3ecbfd53b9e20ef61869d Mon Sep 17 00:00:00 2001 From: dam Date: Thu, 22 Feb 2024 00:42:50 +0000 Subject: Added TODO to solve incoherent function key codes. --- ttt.jai | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'ttt.jai') diff --git a/ttt.jai b/ttt.jai index 072d671..e9adba3 100644 --- a/ttt.jai +++ b/ttt.jai @@ -1358,17 +1358,20 @@ main :: () { case; { TUI.set_cursor_position(3+drop_down, 2); str := TUI.to_string(key); + array_to_print: [..] string; for 0..str.count-1 { - print("'%'", FormatInt.{value = cast(u8)str[it], base=16}); + tmp := tprint("%", FormatInt.{value = cast(u8)str[it], base=16},, temporary_allocator); + array_add(*array_to_print, tmp); } - write_string(":> "); + string_to_print := join(..array_to_print, separator = " "); + print(": % : ", string_to_print); for 0..str.count-1 { if str[it] == #char "\e" { - str[it] = #char "?"; + str[it] = #char "^"; } } write_string(str); - write_string("