Closed dcoshea closed 7 months ago
Yes you are right, I think the mapping was created without realizing how those keys actually work because the up-shift and down-shift codes are not always generated (only if the shift state needs to be changed) so the 0x57 was confused for the actual key. Nevetheless those keys are tricky to use because on a regular scancode 2 keyboard those positions are for "end" and "page down" so most of the time the users would be confused anyway. That can be seen in the comments of the previous mappings.
So I think it is better to leave "insert" and "delete" mappings to the positions where they are familiar for most users and comment the others as "home" will miss "end" and "page up" will miss "page down" and maybe later if it is actually useful to anyone try to manage the 0x6C stuff.
Thanks and best regards
Nevetheless those keys are tricky to use because on a regular scancode 2 keyboard those positions are for "end" and "page down" so most of the time the users would be confused anyway. That can be seen in the comments of the previous mappings.
So I think it is better to leave "insert" and "delete" mappings to the positions where they are familiar for most users
Oops, I forgot I was thinking about what is written on the keys instead of what they map to on a regular PC keyboard!
Thanks!
scancodeDictionaries['122KEY_EN']
includes:The entries shown are the last two, for the Insert and Delete keys respectively. From 5250_Information_Display_System_to_S36_S38_AS400_System_Units_Product_Attachment_Information_198910.pdf page 185 figure 103, it can be seen that those are key numbers 81 and 86 respectively. From page 189 it can be seen that those keys generate the same scan code, and if Alt is not held, based on the "ALT Key Up Note" column and the notes on page 186 it can be seen that the keys can be differentiated based on the shift state.
In the code above, the
0x6c
row was presumably intended for the Insert key and the0x57
key was presumably intended for the Delete key, but the latter scan code appears in theSHIFT_PRESS
list, so presumably that entry in the table is ignored. The following# 0x6c
comment is probably related to the fact that in a scan code dump the Delete key generated both0x57
and0x6c
scan codes (due to the shift key not being held at the time).As further evidence, on a 3476, when I replace the
0x6c
entry with:pressing Insert generates an
i
character and pressing Delete generates ad
character, regardless of whether I'm holding shift.Given that those keys don't currently do anything useful, and can't really be made to right now because the VT52 terminfo entry doesn't provide any suitable entries whose character sequences could be generated, it's probably not worth fixing this right now.
For the record, I think the correct terminfo capabilities are
kich1
for Insert andkdch1
for Delete.