begin
KeyPress(key)
end;
- if down and (ev.keysym.unicode <= $44F) then
- begin
- if IsPrintable1251(ch) then
- CharPress(ch)
- end
+ if down and IsValid1251(ev.keysym.unicode) and IsPrintable1251(ch) then
+ CharPress(ch)
end;
function sys_HandleInput (): Boolean;
function upcase1251 (ch: AnsiChar): AnsiChar; inline;
function locase1251 (ch: AnsiChar): AnsiChar; inline;
+function IsValid1251 (ch: Word): Boolean;
function IsPrintable1251 (ch: AnsiChar): Boolean;
function toLowerCase1251 (const s: AnsiString): AnsiString;
result := ch;
end;
+function IsValid1251 (ch: Word): Boolean;
+begin
+ result := (ch = Ord('?')) or (wc2shitmap[ch] <> '?')
+end;
+
function IsPrintable1251 (ch: AnsiChar): Boolean;
begin
result := (ch >= #32) and (ch <> #127)