+ introduced PTCKEY_LESS (the 102th key on international keyboards, <> when

used with US keyboard layout)
This commit is contained in:
Nikolay Nikolov 2022-03-19 00:04:13 +02:00
parent 07ff5f423a
commit f183b2952e
4 changed files with 16 additions and 6 deletions

View File

@ -1,3 +1,7 @@
next
- added PTCKEY_LESS, which represents the <> key (the 102th key on
international PC keyboards)
0.99.16
- added and implemented SetMousePos in unit ptcmouse
- applied patch by Nicolas QSO <nicolas@qso.com.ar> that fixes the handling of

View File

@ -146,6 +146,7 @@ begin
PTCKEY_MINUS : Result := 'PTCKEY_MINUS';
PTCKEY_BACKQUOTE : Result := 'PTCKEY_BACKQUOTE';
PTCKEY_QUOTE : Result := 'PTCKEY_QUOTE';
PTCKEY_LESS : Result := 'PTCKEY_LESS';
PTCKEY_COMMAND : Result := 'PTCKEY_COMMAND';
PTCKEY_FUNCTION : Result := 'PTCKEY_FUNCTION';
else

View File

@ -192,6 +192,7 @@ const
PTCKEY_MINUS = $BD;
PTCKEY_BACKQUOTE = $C0;
PTCKEY_QUOTE = $DE;
PTCKEY_LESS = $E2;
PTCKEY_COMMAND = $100;
PTCKEY_F13 = $101;
PTCKEY_F14 = $102;

View File

@ -566,12 +566,16 @@ begin
end;
key := nil;
case sym_modded shr 8 of
0: key := TPTCKeyEvent.Create(FNormalKeys[sym_modded and $FF], uni, modkeys, press);
$FF: key := TPTCKeyEvent.Create(FFunctionKeys[sym_modded and $FF], uni, modkeys, press);
else
key := TPTCKeyEvent.Create(PTCKEY_UNDEFINED, uni, modkeys, press);
end;
{ handle the <> key by checking sym, instead of sym_modded }
if sym = XK_less then
key := TPTCKeyEvent.Create(PTCKEY_LESS, uni, modkeys, press)
else
case sym_modded shr 8 of
0: key := TPTCKeyEvent.Create(FNormalKeys[sym_modded and $FF], uni, modkeys, press);
$FF: key := TPTCKeyEvent.Create(FFunctionKeys[sym_modded and $FF], uni, modkeys, press);
else
key := TPTCKeyEvent.Create(PTCKEY_UNDEFINED, uni, modkeys, press);
end;
if (not eaten_by_im) or (pmkDeadKey in modkeys) then
FEventQueue.AddEvent(key);
end;