2000-08-14 11:00 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2000-08-14 11:00 GMT+3 Alexander Kresin <alex@belacy.belgorod.su>
|
||||
* source/rtl/gtwin/gtwin.c
|
||||
* fixed handling of arrow keys for international keyboards
|
||||
* this need to be checked for different keyboards ( now it works
|
||||
* for my :) )
|
||||
|
||||
Changelog: 2000-08-13 15:20 UTC+0500 April White <awhite@user.rose.com>
|
||||
* doc/en/
|
||||
- removed hbapi.txt hbcompat.txt hbset.txt
|
||||
|
||||
@@ -314,22 +314,25 @@ int hb_gt_ReadKey( HB_inkey_enum eventmask )
|
||||
{
|
||||
/* Save the keyboard state and ASCII key code */
|
||||
DWORD dwState = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.dwControlKeyState;
|
||||
WORD wChar = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.wVirtualKeyCode;
|
||||
WORD wKey = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.wVirtualScanCode;
|
||||
ch = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.uChar.AsciiChar;
|
||||
if( ch == 224 )
|
||||
{
|
||||
/* Strip extended key lead-in codes */
|
||||
ch = 0;
|
||||
}
|
||||
else if( ch < 0 )
|
||||
/* && ( ch != -32 || wChar > 50 ) added for
|
||||
international keyboard support ( Alexander Kresin ) */
|
||||
else if( ch < 0 && ( ch != -32 || wChar > 50 ) )
|
||||
{
|
||||
/* Process international key codes */
|
||||
ch += 256;
|
||||
}
|
||||
else if( ch == 0 || ( dwState & ( ENHANCED_KEY | LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED | RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED | SHIFT_PRESSED ) ) )
|
||||
/* && ch == -32 added for international keyboard support ( Alexander Kresin ) */
|
||||
else if( ch == 0 || ch == -32 || ( dwState & ( ENHANCED_KEY | LEFT_ALT_PRESSED | LEFT_CTRL_PRESSED | RIGHT_ALT_PRESSED | RIGHT_CTRL_PRESSED | SHIFT_PRESSED ) ) )
|
||||
{
|
||||
/* Process non-ASCII key codes */
|
||||
WORD wChar = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.wVirtualKeyCode;
|
||||
WORD wKey = s_irInBuf[ s_cNumIndex ].Event.KeyEvent.wVirtualScanCode;
|
||||
if( eventmask & INKEY_RAW ) wKey = wChar;
|
||||
/* Discard standalone state key presses for normal mode only */
|
||||
if( ( eventmask & INKEY_RAW ) == 0 ) switch( wKey )
|
||||
|
||||
Reference in New Issue
Block a user