Char.toCode/Char.fromCode convert to/from UTF-16 values. KeyCode values only intermittently overlap with those. E.g. on Chrome on my Mac, toCode ']' yields 93, while the KeyCode registers as 221.
Char.toCode/Char.fromCode convert to/from UTF-16 values. KeyCode values only intermittently overlap with those.
E.g. on Chrome on my Mac, toCode ']' yields 93, while the KeyCode registers as 221.