Open gombosg opened 3 years ago
I think it's a necessary/added luxury feature for some games, but more useful on a key basis(i.e. in NES games the Y key(xbox controller) bashes the jump key).
Looks like this is the same in antimicro
- present but hidden from users. We have turbo setting for each key, so why is this different?
Looks like this is the same in
antimicro
- present but hidden from users. We have turbo setting for each key, so why is this different?
git blame is your friend...
It is, it's just I don't have time to sort it out now. Feel free to take it if you're interested.
here is where it was added: https://github.com/AntiMicroX/antimicrox/commit/f72fee927751d44ca9a729692ffc5d9c7a92bfc8
Yes, and it is hidden, and it was never exposed to users. The question is why. Not working? Never tested?
It was hidden from the get go...
┌─ /tmp/antimicro-2.3.1/antimicrox-2.3.1/src
└─ ❯ grep -i keyRepeatGroupBox -r .
grep: ./antimicro: binary file matches
grep: ./mainsettingsdialog.o: binary file matches
./ui_mainsettingsdialog.h: QGroupBox *keyRepeatGroupBox;
./ui_mainsettingsdialog.h: keyRepeatGroupBox = new QGroupBox(General);
./ui_mainsettingsdialog.h: keyRepeatGroupBox->setObjectName(QString::fromUtf8("keyRepeatGroupBox"));
./ui_mainsettingsdialog.h: verticalLayout_6 = new QVBoxLayout(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyRepeatEnableCheckBox = new QCheckBox(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: label_4 = new QLabel(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyDelayHorizontalSlider = new QSlider(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyDelaySpinBox = new QSpinBox(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: label_5 = new QLabel(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyRateHorizontalSlider = new QSlider(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyRateSpinBox = new QSpinBox(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: verticalLayout_3->addWidget(keyRepeatGroupBox);
./ui_mainsettingsdialog.h: keyRepeatGroupBox->setTitle(QCoreApplication::translate("MainSettingsDialog", "Key Repeat", nullptr));
./mainsettingsdialog.ui: <widget class="QGroupBox" name="keyRepeatGroupBox">
./mainsettingsdialog.cpp: ui->keyRepeatGroupBox->setVisible(false);
Any ideas?
and there is turboCheckBox:
Maybe the feature was to set a "global turbo rate" value? Shouldn't it have a recommended hard-coded value and let the user override it on a key basis? Maybe @Ryochan7 could help clear this up.
#ifdef Q_OS_WIN
QSettings autoRunReg(RUNATSTARTUPKEY, QSettings::NativeFormat);
QString autoRunEntry = autoRunReg.value("antimicro", "").toString();
if (!autoRunEntry.isEmpty())
{
ui->launchAtWinStartupCheckBox->setChecked(true);
}
bool keyRepeatEnabled = settings->value("KeyRepeat/KeyRepeatEnabled", false).toBool();
if (keyRepeatEnabled)
{
ui->keyRepeatActiveCheckBox->setChecked(true);
ui->keyDelayHorizontalSlider->setEnabled(true);
ui->keyDelaySpinBox->setEnabled(true);
ui->keyRateHorizontalSlider->setEnabled(true);
ui->keyRateSpinBox->setEnabled(true);
}
int keyRepeatDelay = settings->value("KeyRepeat/KeyRepeatDelay", InputDevice::DEFAULTKEYREPEATDELAY).toInt();
int keyRepeatRate = settings->value("KeyRepeat/KeyRepeatRate", InputDevice::DEFAULTKEYREPEATRATE).toInt();
ui->keyDelayHorizontalSlider->setValue(keyRepeatDelay);
ui->keyDelaySpinBox->setValue(keyRepeatDelay);
ui->keyRateHorizontalSlider->setValue(1000/keyRepeatRate);
ui->keyRateSpinBox->setValue(1000/keyRepeatRate);
#else
ui->launchAtWinStartupCheckBox->setVisible(false);
ui->keyRepeatGroupBox->setVisible(false);
#endif
and looks line it's a windows-only feature because of Q_OS_WIN
, ref: https://doc.qt.io/qt-5/qtglobal.html#Q_OS_WIN
and looks line it's a windows-only feature because of
Q_OS_WIN
, ref: https://doc.qt.io/qt-5/qtglobal.html#Q_OS_WIN
confirmed. then maybe we want to add the feature to linux. :grimacing:
And it was removed at https://github.com/AntiMicroX/antimicrox/commit/ce464439650f0c7b87c2f02318bfde9928f91315
Ok this is bad! to restore windows we probably have to bring back this deleted code(and probably much more...)
And also there's this:https://github.com/AntiMicroX/antimicrox/commit/16b4af62574ddc10faa1054e9f08a39e05b87640 which is a part of 2.25(just a few versions after 2.23 which is made by the original team.)
Then I think to restore windows It maybe best to start from somewhere between 2.25 and 2.23 and port back new features from what we have now to windows...
Haven't played with this program since around early 2018 I believe; used it along with MoltenGamepad for my old Wiimote config. The turbo key and key repeat features provide different functionality. The key repeat feature is not really used for games but for Desktop usage like when using a text editor. SendInput (and I believe XTest) do not provide a means to mock key repeating like what normally occurs when using a physical keyboard. The key repeat feature is meant to add fake key repeating by continuing to send key events (cannot remember which event type) at the specified interval. The Uinput event system supports key repeating directly so that feature is not needed when using that event system.
For the most part, that old feature should not be needed for Linux users as most people should probably be using the UInput event system if configured. BSD users (if anyone still uses this on BSD) and Windows users might want the feature to be present but it should not be necessary for playing games.
I think we should remove this code.
It's useful if you use the joypad in a desktop scenario. You assign the dpad to the arrow keys and scroll line by line in documents/web browsers.
Several older games I play require this and will not work without it. They will accept the input only the first time the key is pressed and will not repeat actions properly. Using turbo does not produce the same result either as it will only do the first press action but not the repeated action. Windows 10 User.
@fuhreak
Could you tell which games have this issue?
@fuhreak Could you tell which games have this issue?
MapleStory is the only one I can remember but I've seen it in at least two other games.
The easiest way to reproduce the problem is to create a character and hold the jump/attack buttons down. Both are supposed to repeat the action while held, however when using antimicrox it will only jump or attack once then stop. It should also be noted that antimicro also had this problem but only on Shift Alt and CTRL.
@fuhreak Could you tell which games have this issue?
Thought i would also give my two cents to this matter:
Like @arcadepro mentioned this is a pretty usefull feature in context of Windows desktop and other software such as Blender or Krita. I have been using Antimicro 2.23 for years to map keys onto my joypad and use it for shortcuts instead of my keyboard however since it is not being updated anymore i tried to move to AntmicroX today but quickly realized this feature isn't working so i had to fall back onto 2.24 and am now stuck there. So take this as me imploring to not just drop this super useful/convenient feature i guess... I understand this is open source and you devs work on this in your free time but I just wanted ppl to know that antimicro is not just used for games and in scenarios such as drawing digitally the key repeat is very useful.
@djpsyc
Could you describe how this feature was used in Blender/Krita?
It would be interesting to hear about some examples of Windows games affected by a lack of key repeat functionality. For me, key repeat was mainly necessary on the desktop.
I have had key repeat functionality available for a long time in recent experiments. DS4Windows uses a 500 ms delay followed by a 25 ms interval between keydown events; the relevant Commit routine is run every gamepad poll. The FakerInput virtual KB+M driver allows Windows to handle key repeat functionality directly. DS4Windows supports the use of that driver and my recent experimental mappers use FakerInput for KB+M emulation exclusively.
@djpsyc
Could you describe how this feature was used in Blender/Krita?
Certainly, @pktiuk, I have not worked much in Blender yet and it was mostly mentioned as possible use case scenario as i am still mostly a 2D artist. I have however started using an 8bitdo switch lite controller for it to use as shortcut remote simply because the distinct shape of controller buttons and layout make it easier for me to learn shortcuts compared to a keyboard. In Krita however I use the repeating key press function a lot! Whenever i need to zoom/rotate in increments or even more commonly when i need to change my brush size in increments but semi fast i make use of said function. Having to tap rapidly by hand can get annoying pretty fast. Sure there's other shortcuts i could use but for me that's the easiest and most comfortable way that has stuck with me over the past 3 years that i have been using antimicro for when creating my art.
I am still using antimicro 2.23 and can not move to antimicrox because of this "key repeat" feature...
My purpose is using a PSMove Navigation controller for sending hotkeys in 2D graphic design/painting or multiple-tabs applications like Chrome or Notepad++.
I wish antimicroX keeps this feature.
joykeyrepeathelper.h
andjoykeyrepeathelper.cpp
are not compiled.mainsettingsdialog.ui
.Todo:
Upvote & Fund