Open 1ras opened 1 year ago
int remap_ascii_char (int key) { int i;
if ((key & 0x1000000) && (key & 0xffffff) < 0x7b) key = key & 0xff; for (i=0; ascii_key_map[i].from_code; i++) { if (ascii_key_map[i].from_code == key) return (ascii_key_map[i].to_code); } return key; }
have a try BOOTX64.rar.txt
It's close but some keys are still not working:
0x100007b which should be 0x007b, 0x100007c which should be 0x007c, 0x100007d which should be 0x007d, 0x100007e which should be 0x007e.
I hope I did not miss any.
It works, thanks!
Some UEFI implementations return every SHIFT+key combination with bit 24 set, therefore setkey is not working for this keys. E.g. the uppercase Q returns 0x1000051 instead of 0x0051, the uppercase A returns 0x1000041 instead of 0x0041 and so on. This happens with all SHIFT+key combinations I've tested.
I cleared bit 24 by changing https://github.com/chenall/grub4dos/blob/2b155c93ee0aabe3b7cab21ea9a5da8b4a8cd30e/stage2/builtins.c#L11234 to
if (ascii_key_map[i].from_code == (key &= ~(1<<(24))))
Then setkey is working as expected.
I however did not investigate further to understand the function of this bit. If it just stands for the SHIFT key then clearing the bit might be a possible solution.