diff --git a/docs/notework.txt b/docs/notework.txt index a956d09..31f786b 100644 --- a/docs/notework.txt +++ b/docs/notework.txt @@ -10,6 +10,8 @@ ______________________________________________________________________ Notes for GoldED+ 1.1.5, /snapshot/ ______________________________________________________________________ ++ Win32 version: pressing SHIFT+EditGo* keys will work as EditBlock* keys + ! Added Microsoft Developer Studio 6.0 Workspace and GoldEd Project files (use golded.dsw to open workspace) diff --git a/golded3/geedit.cpp b/golded3/geedit.cpp index 77b7f51..9dfcc61 100644 --- a/golded3/geedit.cpp +++ b/golded3/geedit.cpp @@ -33,6 +33,8 @@ #include #include +gkey kbxget_raw(int mode); + // ------------------------------------------------------------------ // Globals @@ -1205,7 +1207,7 @@ void IEclass::GoWordRight() { if((col >= currline->txt.length()) or (currline->txt[col] == '\n')) { if(currline->next) { GoDown(); - col = 0; + col = mincol; } } else { @@ -1232,11 +1234,11 @@ void IEclass::GoWordRight() { else col--; } - - if(blockcol != -1) - displine(currline, row); } + if (blockcol != -1) + displine(currline, row); + GFTRK(NULL); } @@ -2349,6 +2351,9 @@ int IEclass::handlekey(gkey __key) { case KK_EditBlockPgDn: __key = KK_EditGoPgDn; break; case KK_EditBlockPgUp: __key = KK_EditGoPgUp; break; + case KK_EditBlockWordRight: __key = KK_EditGoWordRight; break; + case KK_EditBlockWordLeft: __key = KK_EditGoWordLeft; break; + case KK_EditCopy: case KK_EditCut: case KK_EditDelete: goto noselecting; @@ -2588,9 +2593,14 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) { vcurlarge(); gkey _ch; + gkey keystatus = 0; do { _ch = getxchtick(); +// TO_PORT_TAG: kbxget_raw(3) +#if defined(__WIN32__) + keystatus = kbxget_raw(3); +#endif if(EDIT->AutoSave()) { time_t _thistime = time(NULL); @@ -2611,6 +2621,32 @@ int IEclass::Start(int __mode, uint* __position, GMsg* __msg) { gkey _kk = SearchKey(_ch, EditKey, EditKeys); if(_kk) { _ch = _kk; + +// TO_PORT_TAG: kbxget_raw(3) +#if defined(__WIN32__) + if (keystatus & SHIFT_PRESSED) +#else + if (0) +#endif + { + switch(_ch) + { + case KK_EditGoUp: _ch = KK_EditBlockUp; break; + case KK_EditGoDown: _ch = KK_EditBlockDown; break; + case KK_EditGoLeft: _ch = KK_EditBlockLeft; break; + case KK_EditGoWordLeft: _ch = KK_EditBlockWordLeft; break; + case KK_EditGoRight: _ch = KK_EditBlockRight; break; + case KK_EditGoWordRight: _ch = KK_EditBlockWordRight; break; + case KK_EditGoBegLine: + case KK_EditGoTopMsg: _ch = KK_EditBlockHome; break; + case KK_EditGoEOL: + case KK_EditGoBotMsg: _ch = KK_EditBlockEnd; break; + case KK_EditGoPgUp: + case KK_EditGoTopLine: _ch = KK_EditBlockPgUp; break; + case KK_EditGoPgDn: + case KK_EditGoBotLine: _ch = KK_EditBlockPgDn; break; + } + } } else { ismacro = IsMacro(_ch, KT_E); diff --git a/golded3/gekeys.h b/golded3/gekeys.h index 6d867e7..f89d595 100644 --- a/golded3/gekeys.h +++ b/golded3/gekeys.h @@ -174,6 +174,8 @@ const gkey KK_EditBlockPgUp = 0xFF02; const gkey KK_EditDelete = 0xFF03; const gkey KK_EditUndo = 0xFF04; const gkey KK_EditDeleteSOL = 0xFF05; +const gkey KK_EditBlockWordLeft = 0xFF06; +const gkey KK_EditBlockWordRight = 0xFF07; const gkey KK_EditSCodeNormal = 0xFF08; const gkey KK_EditSCodeBold = 0xFF09; const gkey KK_EditSCodeItalic = 0xFF0A; diff --git a/goldlib/gall/gkbdbase.cpp b/goldlib/gall/gkbdbase.cpp index e11bb2c..446d50f 100644 --- a/goldlib/gall/gkbdbase.cpp +++ b/goldlib/gall/gkbdbase.cpp @@ -1046,6 +1046,7 @@ gkey kbxget_raw(int mode) { // =2 - return Shifts key status gkey k; +// TO_PORT_TAG: kbxget_raw(3) #if defined(__USE_NCURSES__) int key; @@ -1242,8 +1243,12 @@ gkey kbxget_raw(int mode) { INPUT_RECORD inp; DWORD nread; + static gkey KeyCtrlState = 0; - if(mode == 2) { + if (mode == 3) { + return KeyCtrlState; + } + else if(mode == 2) { return 0; } else if(mode & 0x01) { @@ -1559,6 +1564,10 @@ gkey kbxget_raw(int mode) { } #endif +// TO_PORT_TAG: kbxget_raw(3) +#if defined(__WIN32__) + KeyCtrlState = (gkey)inp.Event.KeyEvent.dwControlKeyState; +#endif return k; }