Skip to content
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

CTRL Key not working on macOS (MacPorts and Brew) #177

Closed
krischik opened this issue Dec 27, 2022 · 15 comments · Fixed by #205
Closed

CTRL Key not working on macOS (MacPorts and Brew) #177

krischik opened this issue Dec 27, 2022 · 15 comments · Fixed by #205

Comments

@krischik
Copy link

krischik commented Dec 27, 2022

The CTRL key is not working macOS. This is the case for both the MacPorts as well as the Brew distribution.

Reproduce

Start emulator into Atari-Basic. Type:

10 PRINT "[CTRL]Q[CTRL]W[CTRL]E[CTRL]R[CTRL]T[CTRL]Z"
RUN

(I have a german keyboard, hence the [CTRL]Z instead of [CTRL]Y)

Expected:

image

Observed:

image

Hint:

The atari800 version from @atarimacosx works correctly. AFAIK @atarimacosx uses SDL Library 2.0 and Metal API and is based atari800 Version 4.2.

@atarixle
Copy link

What version of Mac OS X / OS X / macOS are you running?
May be it has to do with SDL1. SDL1 is not working well anymore on equal / anything higher than High Sierra. This is where sound issues in Atari800MacX started (I heard this from Mac owners who had these OSses in use, while I mad the jump from 10.7 to 10.11, and then to 10.14, 11, 12 on patched Macs).
When I built Atari800 5.0.0 myself on 10.4, 10.5, 10.6, 10.7, 10.8, and 10.11, I didn't observe this issue, these systems fully support SDL1.

@krischik
Copy link
Author

The bug is from December. Before I answer let me update both Brew and MacPorts and check if the bug still exists.

dmsc added a commit to dmsc/atari800 that referenced this issue Sep 19, 2023
This also simplifies the code, as the new SDL key handling is saner.
Probably fixes atari800#177
@dmsc
Copy link
Contributor

dmsc commented Sep 19, 2023

Please, test the patch attached - I also experienced this bug when Debian switched from SDL1 to SDL12-COMPAT.

001-fixes-keyboard-with-sdl12-compat.txt

This is also in a branch in my repo: dmsc@4e02766

dmsc added a commit to dmsc/atari800 that referenced this issue Sep 23, 2023
This also simplifies the code, as the new SDL key handling is saner.
Probably fixes atari800#177
dmsc added a commit to dmsc/atari800 that referenced this issue Oct 11, 2023
This also simplifies the code, as the new SDL key handling is saner.
Probably fixes atari800#177
@jhusak
Copy link
Contributor

jhusak commented Nov 21, 2023

The patch worked on Ventura/M1. Thank you.

@joysfera
Copy link
Member

@dmsc would you create a pull request with the keyboard fixes? Has it been tested on more platforms yet?

@dmsc
Copy link
Contributor

dmsc commented Nov 21, 2023

Hi!

It works on current Debian Unstable, and it works for @jhusak .

The problem is I don't know if it works in older versions of SDL.

@joysfera ¿does it work for you?

Have Fun!

@jhusak
Copy link
Contributor

jhusak commented Nov 21, 2023

I have compiled atari800 from sources with patch applied on MacBookPro Intel with Mojave and it works with control and shift and so. Capslock works too in the same manner. In other words - for me no difference on older mac with patch or without.

@krischik
Copy link
Author

Sadly there is no new release which means I can't update MacPorts (yes, I'm the MacPorts maintainer). It's also unlikely the the Homebrew maintainer will update without an official release.

Considering that is also affects Debian: what are the chances of an 5.0.1 release any time soon? Alternatively I could patch it in for MacPorts as a hotfix but I prefer a proper release.

dmsc added a commit to dmsc/atari800 that referenced this issue Dec 1, 2023
This also simplifies the code, as the new SDL key handling is saner.
Fixes atari800#177
mikrosk pushed a commit that referenced this issue Dec 1, 2023
This also simplifies the code, as the new SDL key handling is saner.
Fixes #177
mikrosk added a commit that referenced this issue May 8, 2024
While this fixed issue #177, it also introduced regression on targets
with native SDL 1.2.

This assumes libsdl-org/sdl12-compat#331 will be fixed in 1.2.70; then
the #if can be removed because the code shall be again compatible with
SDL 1.2 (despite its less than ideal behavior).
@mikrosk
Copy link
Member

mikrosk commented May 8, 2024

This was fun. While investigating #206, I have realised that this was the wrong way to fix the CAPSLOCK issue. It should have been reported in the sdl12-compat project (as I have done now) since it is their bug, not ours.

Anyway, since we don't want to have broken Atari800 release, I have put the CAPSLOCK code into an #if so it works in both native SDL 1.2 and SDL12-compat.

@dmsc I have "reverted" only the "ugly hack" part, the rest seems to be work on native SDL 1.2, too. Just to be on the safe side, does the change in 1a50481 looks OK to you (if it runs on the "broken" SDL 1.2 and not SDL12-compat).

@mikrosk
Copy link
Member

mikrosk commented May 11, 2024

@krischik can you please verify that the CAPSLOCK issue has been fixed for you in 5.2.0? We have a user report about 5.2.0 where the CAPSLOCK key still doesn't work on Macs: https://sourceforge.net/p/atari800/mailman/message/58770622 (it doesn on Linux).

@mikrosk mikrosk reopened this May 11, 2024
@dmsc
Copy link
Contributor

dmsc commented May 12, 2024

Hi!

Sorry for not replying earlier.

This was fun. While investigating #206, I have realised that this was the wrong way to fix the CAPSLOCK issue. It should have been reported in the sdl12-compat project (as I have done now) since it is their bug, not ours.

Anyway, since we don't want to have broken Atari800 release, I have put the CAPSLOCK code into an #if so it works in both native SDL 1.2 and SDL12-compat.

@dmsc I have "reverted" only the "ugly hack" part, the rest seems to be work on native SDL 1.2, too. Just to be on the safe side, does the change in 1a50481 looks OK to you (if it runs on the "broken" SDL 1.2 and not SDL12-compat).

It seems OK.

Problem with the Atari800 code is that it supported too many semi-incompatible platforms, so it was littered with small "ugly fixes" that now don't make much sense.

On a related note, I recently added a github action to my fastbasic repo to compile and test in Linux, Windows and MacOS. this could be added here so you could point the users to download and test the binary easily.

Have Fun!

@mikrosk
Copy link
Member

mikrosk commented May 12, 2024

@dmsc I agree, having binary snapshots is useful. Where do you store the files, though? In the past I used bintray.com and since they cancelled the free plans, private hosting with ash keys stored as secret. But that's not optimal, as we depend on the person providing the storage.

@mikrosk
Copy link
Member

mikrosk commented May 12, 2024

Steve reported that recent fixes also fixed the capslock issue, so closing again. But confirmation from another Mac user is still welcome.

@mikrosk mikrosk closed this as completed May 12, 2024
@dmsc
Copy link
Contributor

dmsc commented May 12, 2024

Hi!

@dmsc I agree, having binary snapshots is useful. Where do you store the files, though? In the past I used bintray.com and since they cancelled the free plans, private hosting with ash keys stored as secret. But that's not optimal, as we depend on the person providing the storage.

They are stored in github as "build artifacts". I created pull request #232 and it seems to work.

Have Fun!

@dmsc
Copy link
Contributor

dmsc commented May 12, 2024

See a test here: https://github.com/dmsc/atari800/actions/runs/9054996227
The downloadable file is at the bottom:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants