2015-11-02 17:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)

* src/rtl/gtsln/kbsln.c
  * tests/inkey.prg
    - removed not longer used HB_INKEY_RAW flag

  * tests/inkey.prg
    * test HB_INKEY_EXT keycodes when second parameter contains "E" letter

  * src/rtl/gtwvt/gtwvt.c
    * minor switch order modification
    * accept 127 as unicode character value if system also do that

  * src/rtl/gtwin/gtwin.c
    + added support for Harbour extended key codes
    + added support for mouse middle button
    + added support for some missing key combinations
    ! fixed mouse event processing
    ! fixed ALT + KeyPad NUMs processing - now it's disabled by default
      because current GTWIN supports native ALT + KeyPad NUMs processing
      provided by MS-Windows console. It works when NUMLOCK is ON. If
      someone needs to process it also when NUMLOCK is OFF then he can
      enable it by:
            hb_gtInfo( HB_GTI_KBDALT, .T. )
    ! fixed and simplified workaround for bug in MS-Windows 95 and 98
      consoles which wrongly decode SHIFT + <NUMBER> with CAPSLOCK ON
      for standard US keyboard drivers. Now enabling this workaround by:
         hb_gtInfo( HB_GTI_KBDSPECIAL, .T. )
      should not break input with fixed keyboard drivers.
    ; please test it with different windows versions and national keyboard
      layouts, tests/gtkeys.prg is quite good test program.
This commit is contained in:
Przemysław Czerpak
2015-11-02 17:13:20 +01:00
parent 12a38cfdc5
commit ef13a4a651
5 changed files with 633 additions and 755 deletions

View File

@@ -10,6 +10,37 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2015-11-02 17:13 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtsln/kbsln.c
* tests/inkey.prg
- removed not longer used HB_INKEY_RAW flag
* tests/inkey.prg
* test HB_INKEY_EXT keycodes when second parameter contains "E" letter
* src/rtl/gtwvt/gtwvt.c
* minor switch order modification
* accept 127 as unicode character value if system also do that
* src/rtl/gtwin/gtwin.c
+ added support for Harbour extended key codes
+ added support for mouse middle button
+ added support for some missing key combinations
! fixed mouse event processing
! fixed ALT + KeyPad NUMs processing - now it's disabled by default
because current GTWIN supports native ALT + KeyPad NUMs processing
provided by MS-Windows console. It works when NUMLOCK is ON. If
someone needs to process it also when NUMLOCK is OFF then he can
enable it by:
hb_gtInfo( HB_GTI_KBDALT, .T. )
! fixed and simplified workaround for bug in MS-Windows 95 and 98
consoles which wrongly decode SHIFT + <NUMBER> with CAPSLOCK ON
for standard US keyboard drivers. Now enabling this workaround by:
hb_gtInfo( HB_GTI_KBDSPECIAL, .T. )
should not break input with fixed keyboard drivers.
; please test it with different windows versions and national keyboard
layouts, tests/gtkeys.prg is quite good test program.
2015-10-29 11:52 UTC+0100 Viktor Szakats (vszakats users.noreply.github.com)
* src/rtl/gtwin/gtwin.c
! add some HB_GTI_* setting to default GT handler

View File

@@ -393,9 +393,6 @@ int hb_gt_sln_ReadKey( PHB_GT pGT, int iEventMask )
return hb_gt_sln_mouse_Inkey( iEventMask, HB_FALSE );
}
if( ( iEventMask & HB_INKEY_RAW ) != 0 )
return tmp;
tmp = hb_sln_FindKeyTranslation( tmp );
if( tmp != 0 )
return tmp;

File diff suppressed because it is too large Load Diff

View File

@@ -2427,30 +2427,30 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
iKey = HB_KX_ESC;
break;
case VK_UP:
iKeyPad = HB_KX_UP;
break;
case VK_DOWN:
iKeyPad = HB_KX_DOWN;
break;
case VK_LEFT:
iKeyPad = HB_KX_LEFT;
break;
case VK_RIGHT:
iKeyPad = HB_KX_RIGHT;
break;
case VK_HOME:
iKeyPad = HB_KX_HOME;
break;
case VK_END:
iKeyPad = HB_KX_END;
break;
case VK_PRIOR:
iKeyPad = HB_KX_PGUP;
break;
case VK_NEXT:
iKeyPad = HB_KX_PGDN;
break;
case VK_END:
iKeyPad = HB_KX_END;
break;
case VK_HOME:
iKeyPad = HB_KX_HOME;
break;
case VK_LEFT:
iKeyPad = HB_KX_LEFT;
break;
case VK_UP:
iKeyPad = HB_KX_UP;
break;
case VK_RIGHT:
iKeyPad = HB_KX_RIGHT;
break;
case VK_DOWN:
iKeyPad = HB_KX_DOWN;
break;
case VK_INSERT:
iKeyPad = HB_KX_INS;
break;
@@ -2607,7 +2607,7 @@ static HB_BOOL hb_gt_wvt_KeyEvent( PHB_GTWVT pWVT, UINT message, WPARAM wParam,
else
{
#if defined( UNICODE )
if( iKey >= 128 )
if( iKey >= 127 )
iKey = HB_INKEY_NEW_UNICODEF( iKey, iFlags );
else
iKey = HB_INKEY_NEW_CHARF( iKey, iFlags );

View File

@@ -14,7 +14,7 @@
#define hb_ntos( n ) LTrim( Str( n ) )
#endif
PROCEDURE Main( cSkip, cRaw )
PROCEDURE Main( cSkip, cExt )
AltD( 0 )
@@ -40,7 +40,7 @@ PROCEDURE Main( cSkip, cRaw )
NextTest()
ENDIF
TEST7( cSkip, cRaw )
TEST7( cSkip, cExt )
?
RETURN
@@ -203,7 +203,7 @@ PROCEDURE TEST6
RETURN
PROCEDURE TEST7( cSkip, cRaw )
PROCEDURE TEST7( cSkip, cExt )
LOCAL nKey, nMask
@@ -216,9 +216,9 @@ PROCEDURE TEST7( cSkip, cRaw )
? "Press any key."
nMask := HB_INKEY_ALL
IF ! Empty( cRaw )
IF Upper( Left( cRaw, 1 ) ) == "R"
nMask += HB_INKEY_RAW
IF ! Empty( cExt )
IF "E" $ Upper( cExt )
nMask += HB_INKEY_EXT
ENDIF
ENDIF