Fixed keystacking conflicts
This commit is contained in:
parent
8d7ce0cd0b
commit
bb0d42bbc2
@ -10,6 +10,12 @@ ______________________________________________________________________
|
|||||||
Notes for GoldED+ 1.1.5, /snapshot/
|
Notes for GoldED+ 1.1.5, /snapshot/
|
||||||
______________________________________________________________________
|
______________________________________________________________________
|
||||||
|
|
||||||
|
- Fixed keystacking conflicts:
|
||||||
|
- KeybClear will not affect keystacking.
|
||||||
|
- Auto Macro will not work if keystacking is used.
|
||||||
|
- MsgListFirst (and meybe other keywords) will work only after all keys
|
||||||
|
in keyboard buffer is consumed.
|
||||||
|
|
||||||
+ @macroses work for ImportBegin and ImportEnd now.
|
+ @macroses work for ImportBegin and ImportEnd now.
|
||||||
|
|
||||||
+ Node address will be shown on nodelist lookup, if point address is not found.
|
+ Node address will be shown on nodelist lookup, if point address is not found.
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#include <golded.h>
|
#include <golded.h>
|
||||||
#include <gckeys.h>
|
#include <gckeys.h>
|
||||||
|
|
||||||
|
extern std::string keybuf;
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
|
|
||||||
@ -1161,19 +1163,25 @@ int ReadKeysCfg(int force) {
|
|||||||
|
|
||||||
// Assign global macros
|
// Assign global macros
|
||||||
std::vector<Macro>::iterator k;
|
std::vector<Macro>::iterator k;
|
||||||
for(k=CFG->macro.begin(), n=0; k != CFG->macro.end(); k++, n++) {
|
for (k = CFG->macro.begin(), n = 0; k != CFG->macro.end(); k++, n++)
|
||||||
if(k->type == 0) {
|
{
|
||||||
if(k->key == KK_Auto) {
|
if (k->type == 0)
|
||||||
|
{
|
||||||
|
if (k->key == KK_Auto)
|
||||||
|
{
|
||||||
|
if (keybuf.empty() && !*CFG->keybstack)
|
||||||
|
{
|
||||||
// Start automacro
|
// Start automacro
|
||||||
mac = k->buf;
|
mac = k->buf;
|
||||||
while(*mac) {
|
while(*mac)
|
||||||
|
{
|
||||||
kbput(*mac);
|
kbput(*mac);
|
||||||
mac++;
|
mac++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
setonkey(k->key, PlayMacro, (gkey)(0xFFFF-n));
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
setonkey(k->key, PlayMacro, (gkey)(0xFFFF-n));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,9 @@ extern int __gftrk_statusline;
|
|||||||
extern bool gmem_check_overrun;
|
extern bool gmem_check_overrun;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static std::string keybuf;
|
extern bool gKeystacking;
|
||||||
|
|
||||||
|
std::string keybuf;
|
||||||
|
|
||||||
static Path cmdlinecfg = "";
|
static Path cmdlinecfg = "";
|
||||||
bool cmdlinedebughg = false;
|
bool cmdlinedebughg = false;
|
||||||
@ -749,17 +751,23 @@ void Initialize(int argc, char* argv[]) {
|
|||||||
waitkey();
|
waitkey();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CFG->switches.get(keybclear)) {
|
if (CFG->switches.get(keybclear) || !keybuf.empty() || *CFG->keybstack)
|
||||||
|
{
|
||||||
clearkeys();
|
clearkeys();
|
||||||
kbclear();
|
kbclear();
|
||||||
if(*CFG->keybstack) // The config keys
|
|
||||||
kbputstr(CFG->keybstack);
|
|
||||||
}
|
}
|
||||||
else if(not keybuf.empty()) { // The commandline keys
|
|
||||||
|
if (not keybuf.empty()) // The commandline keys
|
||||||
|
{
|
||||||
kbputstr(keybuf.c_str());
|
kbputstr(keybuf.c_str());
|
||||||
keybuf.erase();
|
keybuf.erase();
|
||||||
} else if(*CFG->keybstack) // The config keys
|
gKeystacking = true;
|
||||||
|
}
|
||||||
|
else if (*CFG->keybstack) // The config keys
|
||||||
|
{
|
||||||
kbputstr(CFG->keybstack);
|
kbputstr(CFG->keybstack);
|
||||||
|
gKeystacking = true;
|
||||||
|
}
|
||||||
|
|
||||||
fieldupd = EDIT->FieldClear() ? 2 : 1;
|
fieldupd = EDIT->FieldClear() ? 2 : 1;
|
||||||
|
|
||||||
|
@ -186,10 +186,9 @@ void Reader() {
|
|||||||
else {
|
else {
|
||||||
AL.SetActiveAreaNo(startecho);
|
AL.SetActiveAreaNo(startecho);
|
||||||
AA->RandomizeData();
|
AA->RandomizeData();
|
||||||
if(AA->Msglistfirst()) {
|
|
||||||
|
if (AA->Msglistfirst() && (kbput(KK_ReadMessageList) != -1))
|
||||||
reader_msglistfirst = true;
|
reader_msglistfirst = true;
|
||||||
kbput(KK_ReadMessageList);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
reader_msglistfirst = false;
|
reader_msglistfirst = false;
|
||||||
}
|
}
|
||||||
|
@ -497,10 +497,11 @@ void NewArea(bool jumpnext) {
|
|||||||
OrigArea = CurrArea;
|
OrigArea = CurrArea;
|
||||||
strcpy(stecho, AA->echoid());
|
strcpy(stecho, AA->echoid());
|
||||||
AA->RandomizeData();
|
AA->RandomizeData();
|
||||||
if(AA->Msglistfirst()) {
|
|
||||||
kbput(KK_ReadMessageList);
|
if (AA->Msglistfirst() && (kbput(KK_ReadMessageList) != -1))
|
||||||
reader_msglistfirst = true;
|
reader_msglistfirst = true;
|
||||||
}
|
else
|
||||||
|
reader_msglistfirst = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1618,7 +1618,17 @@ void clearkeys() {
|
|||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
// Puts a keystroke into the CXL keyboard "buffer"
|
// Puts a keystroke into the CXL keyboard "buffer"
|
||||||
|
|
||||||
int kbput(gkey xch) {
|
bool gKeystacking = false;
|
||||||
|
|
||||||
|
int kbput(gkey xch)
|
||||||
|
{
|
||||||
|
if (gKeystacking)
|
||||||
|
{
|
||||||
|
if (gkbd.kbuf != NULL)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
gKeystacking = false;
|
||||||
|
}
|
||||||
|
|
||||||
KBuf* kbuf;
|
KBuf* kbuf;
|
||||||
KBuf* temp;
|
KBuf* temp;
|
||||||
|
Reference in New Issue
Block a user