I am trying to work with osascript's System Events from my own program in order to control the Shift key on my keyboard.
To be specific, when I receive certain input from my own program, I press the Shift key, keep it as is, and press the Shift key back when finishing typing. .
The command I am going to run is as follows
I recently confirmed that the entire OS freezes for a moment immediately after the above command is executed.
Can you think of any possible causes?
I identified it around January 2020, and I hadn't seen anything specifically like this before that.
If the phenomenon of the whole OS freezing for a second is an osascript specification, can you tell me how to avoid it?
To be specific, when I receive certain input from my own program, I press the Shift key, keep it as is, and press the Shift key back when finishing typing. .
The command I am going to run is as follows
Code Block osascript -e 'tell application "System Events" to key up shift' osascript -e 'tell application "System Events" to key down shift'
I recently confirmed that the entire OS freezes for a moment immediately after the above command is executed.
Can you think of any possible causes?
I identified it around January 2020, and I hadn't seen anything specifically like this before that.
If the phenomenon of the whole OS freezing for a second is an osascript specification, can you tell me how to avoid it?