-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to support Qt keyboard input directly. Fixes #11653 #11720
Conversation
…ckname crash on mac)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the commented code, not really concerned about the spaces or unchecked map lookup...
-[Unknown]
UI/GameSettingsScreen.cpp
Outdated
#elif defined(USING_QT_UI) | ||
systemSettings->Add(new Choice(sy->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname); | ||
// #elif defined(USING_QT_UI) | ||
// systemSettings->Add(new Choice(sy->T("Change Nickname")))->OnClick.Handle(this, &GameSettingsScreen::OnChangeNickname); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just delete rather than leaving in commented code, git remembers forever after all.
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you're right.
Qt/QtMain.cpp
Outdated
NativeKey(KeyInput(DEVICE_ID_KEYBOARD, KeyMapRawQttoNative.find(((QKeyEvent*)e)->key())->second, KEY_DOWN)); | ||
{ | ||
auto qtKeycode = ((QKeyEvent*)e)->key(); | ||
int nativeKeycode = KeyMapRawQttoNative.find(qtKeycode)->second; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, another tab/space battleground.
I realize this was here before, but I wonder now: is KeyMapRawQttoNative
guaranteed to have all keys in it?
-[Unknown]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed it too but was too lazy to do anything about it since it was already there. I'll change it.
Fixes #11653 by avoiding the native dialog which can't be spawned from the main thread.