Re: Invoke Virtual Keyboard on Desktop (Apple)?
Posted: Fri Sep 13, 2024 7:30 pm
Feel free to give this a go on a mac. Completely untested, and it may not work at all.
A forum for xTalk discussion
https://forums.openxtalk.org/
Code: Select all
tell application "Finder"
if application "KeyboardViewer" is running then
quit application "KeyboardViewer"
else
activate application "KeyboardViewer"
end if
end tell
This does not work on macOS Sonoma. And after Googlin around for an answer it seems there's not really a good way to do bring this up programmatically. I don't like AppleScripts that use 'UI Scripting'. For one thing UI scripting needs to first be activated in the assistive services panel. And I also do not trust that they won't break the next time Apple makes some change to the macOS UI. However AppleScript seems to be the only solutions for this problem on StackOverflow.richmond62 wrote: ↑Fri Sep 13, 2024 7:30 pmNot round these parts (MacOS 12).Code: Select all
tell application "Finder" if application "KeyboardViewer" is running then quit application "KeyboardViewer" else activate application "KeyboardViewer" end if end tell