Conversation
…rds in keymappings_linux.plist so that shift key works
…WithSize if one does not yet exist and fix problem with populating fullscreen modes
|
Strange. While the first three startups of the game were distorted as above (it took me that long to make the screenshots), I ran it again to see whether in combat you also need to aim elsewhere. And all of a sudden the complete behaviour is normal again. Not sure where the effect came from but I cannot reproduce it. |
|
Guess we're good to merge then? |
|
@kanthoney Please go ahead with merge if you're ready |
|
@phkb Can you check something for me with the non-US keyboards? I think SDL3 just knows what keyboard layout you're using so I don't think the keyboard layout setting in game options is doing anything any more. If it's not doing anything I might as well remove that option |
|
I have an international keyboard with german layout. It looks pretty much like this one: With oolite_dev-1.93.1-PullRequest620.174-x86_64.AppImage I went to the keyboard settings and assigned the 'y' key to a function. It was properly acknowledged as 'y' on the screen. Then I assigned '#' to the same function. Again that was properly acknowledged as '#' on the screen. In the game I could use the function with that key. Any specific test that you are after? |
|
@oocube What happens if you change your keyboard setting in the OS - does Oolite use the correct keys? If I understand correctly, the behaviour change you see is expected: with SDL3, the "Current keyboard layout" setting in the game is no longer needed (and should be removed) because Oolite instead uses the OS setting. |
|
@kanthoney I have tried switching to the English Dvorak keyboard in the OS and launching the game. The key P on a Dvorak keyboard is where R is on a Qwerty keyboard. In Oolite, I had to press R (Dvorak P) to pause. Accelerating is W in the Oolite key configuration. Pressing Dvorak W (which is on the bottom row of keyboard) accelerated (not Qwerty W). Presumably this is what you expect? |
|
The current keyboard setting changes which section of the keyconfig2.plist Oolite will use. Keyconfig2.plist has a bunch of tweaks to various keys so that each keyboard type matches the OoliteRS.pdf file, and so there is consistency in player experience, without having to manually tweak the keyboard layout themselves. It doesn't have anything to do with SDL or what keyboard is set in the OS. |
|
I won't have a chance to explore this in more detail until tomorrow. I'll report back then |
By this do you mean that if I play on a Dvorak keyboard, the key positions should be the same as on a Qwerty keyboard eg. accelerate which is W on a Qwerty keyboard is instead mapped automatically by Oolite to , (comma) on a Dvorak keyboard because comma on Dvorak is in the same position as W on Qwerty (ie. below 2 and 3)? |
|
@mcarans I'm expecting P to pause on any keyboard layout, regardless of where the P key is located, so that sounds right to me |
|
When I hacked my first PC with MS DOS and assembly language, there were two ways to access keyboard input:
With the keyboard driver in the loop you could now distinguish raw (make and break codes) and cooked modes. Why am I mentioning all this? Even today, when looking at libraries that abstract away the hardware there are traces of this behaviour: As an example, mind the keyPressed, keyReleased (both raw) and keyTyped (cooked) methods in Java AWT. And I suspect SDL is no different here. That means we should not only look at what the user does but also how the application processes these events. How is that implemented in Oolite? Edit: https://wiki.libsdl.org/SDL3/BestKeyboardPractices |
|
@oocube is the keyboard layout in your OS set to German? If I set my keyboard layout to German in my OS everything works as I'd expect, i.e. to zoom I have to press where the Z key would be on a German keyboard |
Answering both: My Ubuntu is configured for german keyboard, and I do not switch the layout just to write english. Thus, Oolite always perceives the german input driver settings. In my above experiments I just switched the keyboard inside Oolite. Note my comment before I switched: At that time Oolite was displaying "Default (US)", and the keys behaved well. To me it looked like Oolite tried to apply some mapping for the keyboard which SDL may have covered already. |
|
Oh rats. Now that I started fooling around the keyboard combinations, I no longer can request the docking clearance or perform the fast docking. Shift+L and Shift+C are no longer effective despite they are mentioned in the UI and I tried both within Oolite on Default (US) and German. What is going on here? After all the autoilot activates when pressing "c". |
|
@oocube Can you try the latest commit? |
|
I tested based on oolite_dev-1.93.1-PullRequest620.175-x86_64.AppImage. Well done! |




Upgrade to SDL3 #578
This pretty much works on my machine, so I figure it's close enough to ready to be tested on a wider range of setups.
I haven't been able to resolve the Linux/Wayland splash screen problem where the game screen ends up largely off screen due to Wayland not allowing programatic window placement, so we'll have to continue with the separate splash screen program work around for now.
On Windows, Oolite starts with the window underneath the command prompt I'm launching from - I'm not sure what's causing that.