-
Notifications
You must be signed in to change notification settings - Fork 86
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
[macOS] keyboard issues #395
Comments
I suppose the binding issues have something to do with the contents of |
Hi, @sjavora and thanks for bug report!
This is an engine bug: engine assumes, that
Yep, need to add them. As for hex values, those are internal values used by original Gothic2 *.ini files. For Mac-specific keys, assigning some unique values should be good enough.
Apparently you have overlap of action-key and trow-key somehow.
Not 100% if I truly follow this, yet seem to be correct behavior. If left/right key is not participating in combo (or timing is missed), then this is a move. |
Hey @Try!
Is Trying it in G2 in a Wineskin bottle, it looks to me like
So I just checked this again. It's not even limited to a weapon being drawn. As long as I hold Is there something I can do to help? I have an M1 Mac (obviously) and experience with software development, though probably not very useful here (never worked on something like this, only iOS apps). |
Tested how keys are working in vanilla: Following GIT blame,
For now decide to lower priority of hard-coded keys, so they wont clash with game-related actions |
It would prefect, if you can take a look in |
Ok, I'll try 👍 Just tried |
Alright, I've found the line that needs to be altered: bool allowRot = !(pl.isPrehit() || pl.isFinishingMove() || pl.bodyStateMasked()==BS_CLIMB); I tested this by adding The question now is... what to put there? I'm not sure what property I can use - the only condition in my head is "action is being held down". I don't know if that in itself is tracked anywhere or whether that sets some bit somewhere... |
There are multiple options: |
Indeed - adding that does exactly what I observe in vanilla!
Why? 🤔 This behavior happens regardless of whether you have a weapon drawn. Should I make a merge request? |
Ah, OK then :) |
Sorry for the delay - PR is up - #400. |
Now for the final item
Could you point me to where this is processed? |
Probably need to do similar hack to Windows. On windows, when receiving any event, engine does explicit check for static bool altL = false;
static bool altR = false;
if((GetKeyState(VK_LMENU) < 0)!=altL) {
altL = !altL;
handleKeyEvent(cb,altL ? WM_SYSKEYDOWN : WM_SYSKEYUP,VK_MENU,0);
}
if((GetKeyState(VK_RMENU) < 0)!=altR) {
altR = !altR;
handleKeyEvent(cb,altR ? WM_SYSKEYDOWN : WM_SYSKEYUP,VK_MENU,0x01000000);
} On apple, there seem to be a proper PS |
Created PR implementing modifiers handling over in Try/Tempest#45. |
And final PR for this issue - #402. Thanks again for your help, I'm sure I'll find other things later, but for now I can finally play 🤩. |
Hi, just discovered this project - awesome job!
Trying to play I discovered a couple of problems with the controls. I'm unable to bind most of the lowest row of my keyboard. Specifically on my MBP keyboard, these are control, left option (alt), left command, right command, right option (alt). Also neither Shift key works. The main menu just does nothing when I try to bind them. Only the space bar works. I'm assuming this is some kind of mapping issue, but I have no idea what to do about it. I'm using an US keyboard layout.
I also tried equipping a weapon (the heavy branch at the very beginning), but hitting action in the inventory drops the item instead of using it. This can be worked around by using the numbers to assign slots, but I imagine that won't work for consumables.
Finally, swinging the weapon left or right and then holding down either left or right when not focused on an enemy will cause the character to keep turning in that direction, same as if action was not held down. In "official" Gothic I believe the behavior is that as long as action is being held, the character won't turn.
The text was updated successfully, but these errors were encountered: