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

[2.0.0-beta.2] shortcuts writing "=" on AZERTY keyboards #15

Open
JeroenVdb opened this issue Nov 16, 2020 · 9 comments
Open

[2.0.0-beta.2] shortcuts writing "=" on AZERTY keyboards #15

JeroenVdb opened this issue Nov 16, 2020 · 9 comments

Comments

@JeroenVdb
Copy link

JeroenVdb commented Nov 16, 2020

I know your still working on the rewrite but here is some input on something I'll probably miss when using a QWERTY keyboard.

When I run this code:

tell script "Slack"
	send message "this is an automated message" in channel "#testjeroen"
	clear status
	set as away
end tell

I get this on Slack:

this is an automated message
=Clear your status
=Set yourself as active

Screenshot:
Screenshot 2020-11-15 at 16 21 17

When I switch my keyboard layout to QWERTY it works better BUT the messages are not send (enter).

Example screenshot:
Screenshot 2020-11-16 at 08 32 47

@samknight
Copy link
Owner

Hi,

My theory at the moment is that the delays in the code are too short. Could you add in a manual delay 0.5 or longer between each step and see that resolves it for now

@JeroenVdb
Copy link
Author

JeroenVdb commented Nov 25, 2020

You are right, this works (with QWERTY):

tell script "Slack"
	send message "this is an automated message" in channel "#testjeroen"
	delay 0.5
	set as away
end tell

@samknight
Copy link
Owner

Hi, I've updated the library with a slower process https://github.com/samknight/slack_applescript/releases/tag/2.0.0.rc1

@fixcompain
Copy link

Hi, did you correct it for AZERTY keyboard too ?

@samknight
Copy link
Owner

I've not been able to test it I'm afraid. Do you know what the theoretical issues could be between AZERTY and QWERTY in AppleScript?

@fixcompain
Copy link

I know that "key codes" are generated by keys according to their physical positions in the keyboard, so I can't really tell if there is a solution at the end May you use copy paste instead ?

@linux2647
Copy link

I've noticed the same issue if I have Dvorak enabled. Instead of a /, a z is typed instead, as the keycode that emits a / in QWERTY emits a z in Dvorak.

@samknight
Copy link
Owner

I'm afraid this has been my only ever AppleScript project so this one has stumped me I'm afraid. I'll keep looking but I don't think I'll be managing to solve this one any time soon.

I'm reliant on a few key codes that I don't think I can replicate with keystroke.

  • Esc
  • Enter
  • Tab

I can replace key code 44 with "/" so that would help with potentially a couple of scripts

@samknight
Copy link
Owner

I have replace the key code with with the "/" in 2.0.3 - can you let me know if this solves the issue?

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

No branches or pull requests

4 participants