Bug with MacOS & onscreen keyboards?

Organizing tasks to work on, New Features Ideas, Building LCS & LCB Libraries & Widgets, Redecorating and Modifying the IDE, Hacking / Editing Tools, Compiling the Engine from Source, etc.
Post Reply
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Bug with MacOS & onscreen keyboards?

Post by tperry2x »

I think I may have just stumbled on another bug I didn't know about.
Found this only seems to affect the Mac version.

On MacOS Catalina at least, if you turn on the onscreen keyboard, and try to do a bit of script editing, when you close the script editor window, it'll spontaneously crash.

Demo video:
https://tsites.co.uk/otherstuff/crash-k ... viewer.mp4

As soon as the keyboard viewer is closed, reopen the IDE and the problem is gone and it behaves normally.

I only found this as I didn't have any spare USB ports to plug in a keyboard (why do macs have so few ports is another topic), so I used the onscreen one and found this bug.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by OpenXTalkPaul »

tperry2x wrote: Thu Nov 02, 2023 9:26 pm I think I may have just stumbled on another bug I didn't know about.
Found this only seems to affect the Mac version.

On MacOS Catalina at least, if you turn on the onscreen keyboard, and try to do a bit of script editing, when you close the script editor window, it'll spontaneously crash.

Demo video:
https://tsites.co.uk/otherstuff/crash-k ... viewer.mp4

As soon as the keyboard viewer is closed, reopen the IDE and the problem is gone and it behaves normally.

I only found this as I didn't have any spare USB ports to plug in a keyboard (why do macs have so few ports is another topic), so I used the onscreen one and found this bug.
What macOS version are you running in that video?

In previous versions of macOS the engine's keyboard message trapping mechanism could continue to capture messages even when the IDE was in the background. This behavior has changed in recent macOS (so no doing this key capturing method in background) as part of Apple's ever tightening sandboxing of apps and turning macOS into iOS (or fusing the two OSes? They're much the same at the core).

Coincidentally, I spent some time this week developing an onscreen-keyboard as a widget.
Screenshot 2023-11-02 at 7.28.52 PM.png
Screenshot 2023-11-02 at 7.28.52 PM.png (277.44 KiB) Viewed 1175 times
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by tperry2x »

OpenXTalkPaul wrote: Thu Nov 02, 2023 11:30 pm What macOS version are you running in that video?
This is on Catalina (10.15.7 to be precise).
The last version my MacBook Air (with a dodgy built-in keyboard - hence why I had to either plug in a USB one or use the onscreen one) will comfortably run without noticable slowdowns. Not sure if the same thing happens in "Big Sur" and above. My guess is that it probably does.
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by richmond62 »

While we are 'on' the snag of Apple machines being MEAN re USB 2 & 3 ports: this is the reason why I have 4 cheapo, powered USB hubs, as cannot be arsed to play switcheroo every time I want to plug in one of my 20-odd external backup drives or some of my funky peripherals.

Currently writing this on my 2018 Mac Mini running MacOS 14 with a Belkin n52 Nostromo connected . . .
-
BelkinN.jpg
BelkinN.jpg (5.25 KiB) Viewed 1158 times
-
Sure beats "Wanker's Cramp". 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by tperry2x »

Haha, yes - definitely going to have to get myself a USB hub.
And a slimline keyboard. (me, spending money... shock horror!)
User avatar
tperry2x
Posts: 1533
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by tperry2x »

OpenXTalkPaul wrote: Thu Nov 02, 2023 11:30 pm Coincidentally, I spent some time this week developing an onscreen-keyboard as a widget.
Screenshot 2023-11-02 at 7.28.52 PM.png
I like this a lot, can I make a suggestion though.
If it can detect 'the platform' and replace that Windows key with an Apple symbol ( - this character probably only shows on a mac), the word "CMD" if on Linux, and the infamous Windows logo if on Windows?

Only because these keys need swapping around if considering Mac and Windows differences:
ALT-Option-Key-Mac-2572742840.jpg
ALT-Option-Key-Mac-2572742840.jpg (37.85 KiB) Viewed 1136 times
Screenshot at 2023-11-03 14-15-28.png
Screenshot at 2023-11-03 14-15-28.png (13.8 KiB) Viewed 1136 times
There's also the question of different keyboard layouts and languages too at some point.
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by OpenXTalkPaul »

tperry2x wrote: Fri Nov 03, 2023 2:12 pm
OpenXTalkPaul wrote: Thu Nov 02, 2023 11:30 pm Coincidentally, I spent some time this week developing an onscreen-keyboard as a widget.
Screenshot 2023-11-02 at 7.28.52 PM.png
I like this a lot, can I make a suggestion though.
If it can detect 'the platform' and replace that Windows key with an Apple symbol ( - this character probably only shows on a mac), the word "CMD" if on Linux, and the infamous Windows logo if on Windows?

Only because these keys need swapping around if considering Mac and Windows differences:
ALT-Option-Key-Mac-2572742840.jpg
Screenshot at 2023-11-03 14-15-28.png

There's also the question of different keyboard layouts and languages too at some point.
Yes, as you can see I already have keys with multiple labels, which is an SVG compound path which is stored in an array for each key, in a list of all keys. I can make additional labels (array elements) and properties for setting which to use. I'm actually already doing this with the furthest right 'mediaKeys' (found on older USB Mac keyboards, alternatively F16 to F19), that far right key can be 'Mute' or 'Eject' (from back when lots of people still used optical drives), although in that last screenshot they're both being drawn.

I was considering the automatic-changing the label based on 'the platform', for the very reason you mentioned. 'CommandKey' = ControlKey (Win/Linux), 'CommandKey' <> ControlKey (on MacOS) positions swapped (people who've used a PC keyboard with macOS know command/option swap setting in the system panel). But a property setting would be better, in case you want to show 'PC' style instead of Mac style when you're on a Mac. I'd like for this to be as a generally useful for a variety of tasks as I can make it. Probably add changing individual keys backColors fills (like you can with my on-screen Piano widget), that way you can colorize arbitrary sections of keys (A,W,S,D in games for example)

I also made frames for three different widths, the idea being it can hide the Numpad section, or hide the arrowKeys/Page keys section and the Numpad ( miniKeyboard mode).

One thing I did not do was multiple keyboard layouts, this is based on U.S. version of keyboard(s), I know some international keyboards have slightly different layouts.

A nice thing is I set this up to, by default, inherent its colors, and so, provided the group or card the widget is in does't have anything set, it auto-toggles between darkMode/lightMode from the OS.
OnScreenKeyboardDarkMode.jpg
OnScreenKeyboardDarkMode.jpg (88.28 KiB) Viewed 1117 times
User avatar
OpenXTalkPaul
Posts: 1574
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by OpenXTalkPaul »

OpenXTalkPaul wrote: Sat Nov 04, 2023 12:18 am
A nice thing is I set this up to, by default, inherent its colors, and so, provided the group or card the widget is in does't have anything set, it auto-toggles between darkMode/lightMode from the OS.
10479743_10152185697952027_565614641888506722_n.png
10479743_10152185697952027_565614641888506722_n.png (313.93 KiB) Viewed 1115 times
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by richmond62 »

I am surprised by the Oxford comma (which I often use, mainly to annoy Bulgarian teachers of English, who can get very dogmatic), because, when I was at SIUC I was told that in the US that was called the Harvard comma.
https://richmondmathewson.owlstown.net/
FourthWorld
Posts: 280
Joined: Sat Sep 11, 2021 4:37 pm
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by FourthWorld »

richmond62 wrote: Sat Nov 04, 2023 6:26 am I am surprised by the Oxford comma (which I often use, mainly to annoy Bulgarian teachers of English, who can get very dogmatic), because, when I was at SIUC I was told that in the US that was called the Harvard comma.
Sounds like a Harvard graduate looking for validation. In all my lifetime in the States I've only heard it referred to as the Oxford comma.
User avatar
richmond62
Posts: 2766
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Bug with MacOS & onscreen keyboards?

Post by richmond62 »

Sounds like a Harvard graduate looking for validation. In all my lifetime in the States I've only heard it referred to as the Oxford comma.
I took my B.A. at Durham (that's Durham City, County Durham, England, NOT Durham, North Carolina), the place where all the people go who just cannot quite get into Oxford, so I have no particular drum to beat.

Mind you, I took my M.A. from SIUC where 'useful' characters like Richard Roundtree and John Belushi also 'studied'.

Oh, and while I am here, "Animal House" is based on SIUC! 8-)

I mean "Yo!":

https://dailyegyptian.com/36358/archive ... e-filming/
https://richmondmathewson.owlstown.net/
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests