I would like to have a keyboard shortcut that changes the last typed word to the next input language.
For example, frequently you start typing with wrong input language and you realize it, you delete the word pressing backspace several times, you switch the input language with the shortcut and then you start typing again.
It would be great if bettertouchtool could do this with a shortcut like double shift press.
would this be just for updating the spell correction?
Maybe you could achieve this by combining some shortcuts.
On macOS shift + option + arrow left will select the current word to its beginning. Then ctrl+space will change the input language for that selected text
i just did the same thing!
now i am trying to figure out how to use the transform selection with javascript to make it write the last word again after changing input language
that would be possible - however do you really need to write it again? On my system it seems just selecting it and changing the input language is enough to make macOS recognize the change.
ah I think understand - you are switching to a language with a different alphabet? (I'm usually just switching from english to german, and there the only thing that would change is the macOS spell correction)
I think automatically re-typing with a different character set would not work, but I'll have a look :-/
Is there a way to change input language from an action ?
The simulated key press does not work so well on Sonoma due to known bug for delay on switch input languages.
I think there is currently no way to achieve this. It's on my TODO list to add a "wait for x seconds" option to key sequences, so they will only trigger if no other input comes after a certain amount of time, but it's not yet integrated.
However, in the case of shift, this affects normal writing. So this is only recommended if you don't need shift for anything else.
Since you probably have two shift keys, the alternative would be to distribute the two actions (always 1) to both keys. This does not interfere with normal writing, because the sequence is interrupted when you type shift + letter ... I hope.
sounds good, but as you say it is not as good for the shift button.
although there are 3rd party apps that can handle this, maybe with the delay @Andreas_Hegenberg said
thank you very much for this,
although a toggle input source (between languages not emojis or dictation) would be better
or is there a way to trigger an action from inside javascript that transforms the text?