Fixed keystacking conflicts
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
#include <golded.h>
|
||||
#include <gckeys.h>
|
||||
|
||||
extern std::string keybuf;
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
@@ -1161,19 +1163,25 @@ int ReadKeysCfg(int force) {
|
||||
|
||||
// Assign global macros
|
||||
std::vector<Macro>::iterator k;
|
||||
for(k=CFG->macro.begin(), n=0; k != CFG->macro.end(); k++, n++) {
|
||||
if(k->type == 0) {
|
||||
if(k->key == KK_Auto) {
|
||||
// Start automacro
|
||||
mac = k->buf;
|
||||
while(*mac) {
|
||||
kbput(*mac);
|
||||
mac++;
|
||||
for (k = CFG->macro.begin(), n = 0; k != CFG->macro.end(); k++, n++)
|
||||
{
|
||||
if (k->type == 0)
|
||||
{
|
||||
if (k->key == KK_Auto)
|
||||
{
|
||||
if (keybuf.empty() && !*CFG->keybstack)
|
||||
{
|
||||
// Start automacro
|
||||
mac = k->buf;
|
||||
while(*mac)
|
||||
{
|
||||
kbput(*mac);
|
||||
mac++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
setonkey(k->key, PlayMacro, (gkey)(0xFFFF-n));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -45,7 +45,9 @@ extern int __gftrk_statusline;
|
||||
extern bool gmem_check_overrun;
|
||||
#endif
|
||||
|
||||
static std::string keybuf;
|
||||
extern bool gKeystacking;
|
||||
|
||||
std::string keybuf;
|
||||
|
||||
static Path cmdlinecfg = "";
|
||||
bool cmdlinedebughg = false;
|
||||
@@ -749,17 +751,23 @@ void Initialize(int argc, char* argv[]) {
|
||||
waitkey();
|
||||
}
|
||||
|
||||
if(CFG->switches.get(keybclear)) {
|
||||
if (CFG->switches.get(keybclear) || !keybuf.empty() || *CFG->keybstack)
|
||||
{
|
||||
clearkeys();
|
||||
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());
|
||||
keybuf.erase();
|
||||
} else if(*CFG->keybstack) // The config keys
|
||||
gKeystacking = true;
|
||||
}
|
||||
else if (*CFG->keybstack) // The config keys
|
||||
{
|
||||
kbputstr(CFG->keybstack);
|
||||
gKeystacking = true;
|
||||
}
|
||||
|
||||
fieldupd = EDIT->FieldClear() ? 2 : 1;
|
||||
|
||||
|
@@ -186,10 +186,9 @@ void Reader() {
|
||||
else {
|
||||
AL.SetActiveAreaNo(startecho);
|
||||
AA->RandomizeData();
|
||||
if(AA->Msglistfirst()) {
|
||||
|
||||
if (AA->Msglistfirst() && (kbput(KK_ReadMessageList) != -1))
|
||||
reader_msglistfirst = true;
|
||||
kbput(KK_ReadMessageList);
|
||||
}
|
||||
else
|
||||
reader_msglistfirst = false;
|
||||
}
|
||||
|
@@ -497,10 +497,11 @@ void NewArea(bool jumpnext) {
|
||||
OrigArea = CurrArea;
|
||||
strcpy(stecho, AA->echoid());
|
||||
AA->RandomizeData();
|
||||
if(AA->Msglistfirst()) {
|
||||
kbput(KK_ReadMessageList);
|
||||
|
||||
if (AA->Msglistfirst() && (kbput(KK_ReadMessageList) != -1))
|
||||
reader_msglistfirst = true;
|
||||
}
|
||||
else
|
||||
reader_msglistfirst = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user