From b2ac52fc11a2ffade28bd300bacaccf05a20ec7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Czerpak?= Date: Thu, 25 Apr 2013 12:17:26 +0200 Subject: [PATCH] =?UTF-8?q?2013-04-25=2012:18=20UTC+0200=20Przemys=C5=82aw?= =?UTF-8?q?=20Czerpak=20(druzus/at/poczta.onet.pl)=20=20=20*=20src/rtl/hbg?= =?UTF-8?q?tcore.c=20=20=20=20=20!=20updated=20INKEYPOOL()=20code=20to=20r?= =?UTF-8?q?espect=20extended=20key=20code=20in=20ALT+C=20and=20=20=20=20?= =?UTF-8?q?=20=20=20ALT+D=20detection?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ChangeLog.txt | 5 +++++ src/rtl/hbgtcore.c | 53 ++++++++++++++++++++++++++++++++++------------ 2 files changed, 45 insertions(+), 13 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 2083cfb0a0..bdf538eab2 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-04-25 12:18 UTC+0200 Przemysław Czerpak (druzus/at/poczta.onet.pl) + * src/rtl/hbgtcore.c + ! updated INKEYPOOL() code to respect extended key code in ALT+C and + ALT+D detection + 2013-04-24 23:58 UTC+0200 Przemysław Czerpak (druzus/at/poczta.onet.pl) - contrib/gtqtc/gtqtc.cpp + contrib/gtqtc/gtqtc1.cpp diff --git a/src/rtl/hbgtcore.c b/src/rtl/hbgtcore.c index bede936a77..28cf6fd1b6 100644 --- a/src/rtl/hbgtcore.c +++ b/src/rtl/hbgtcore.c @@ -2806,22 +2806,49 @@ static void hb_gt_def_InkeyPollDo( PHB_GT pGT ) if( iKey ) { - switch( iKey ) + if( HB_INKEY_ISEXT( iKey ) ) { - case HB_BREAK_FLAG: /* Check for Ctrl+Break */ - case K_ALT_C: /* Check for normal Alt+C */ - if( hb_setGetCancel() ) + if( HB_INKEY_FLAGS( iKey ) & HB_KF_ALT ) + { + switch( HB_INKEY_VALUE( iKey ) ) { - hb_vmRequestCancel(); /* Request cancellation */ - return; - } - break; - case K_ALT_D: /* Check for Alt+D */ - if( hb_setGetDebug() ) - { - hb_vmRequestDebug(); /* Request the debugger */ - return; + case 'C': + case 'c': + if( hb_setGetCancel() ) + { + hb_vmRequestCancel(); /* Request cancellation */ + return; + } + break; + case 'D': + case 'd': + if( hb_setGetDebug() ) + { + hb_vmRequestDebug(); /* Request the debugger */ + return; + } } + } + } + else + { + switch( iKey ) + { + case HB_BREAK_FLAG: /* Check for Ctrl+Break */ + case K_ALT_C: /* Check for normal Alt+C */ + if( hb_setGetCancel() ) + { + hb_vmRequestCancel(); /* Request cancellation */ + return; + } + break; + case K_ALT_D: /* Check for Alt+D */ + if( hb_setGetDebug() ) + { + hb_vmRequestDebug(); /* Request the debugger */ + return; + } + } } HB_GTSELF_INKEYPUT( pGT, iKey ); }