Skip to content

script for automatically changing the keyboard input language based on the specific app preferences

Notifications You must be signed in to change notification settings

AsafShul/auto_language_switcher_MacOS

Repository files navigation

Auto language switcher for MacOS

no more need to manually change the language when switching between apps, or re-write mistyped text!

this repo will automatically change the keyboard input language based on the specific app preferences, and fix mistypes.

image

image

  • ment to work if you have 2 languages set on your Mac (the swap is equivalent to '^ + space').

Instructions:

  1. in the 'run.command' change the folliwing:
  • change the absolute path for the 'language_switcher.py'.

  • optional: the fix activation sequance (default '000').

  1. Change the language preferences in the 'language_config.json' file for each app to suit your needs.
  2. create an 'conversion_chart_<MAIN_LAYOUT>_<SECONDARY_LAYOUT>.json' in the same format for your language (its a somewhat manual process, you can use chatGPT to speef it up). in this repo, MAIN_LAYOUT='ABC' (thats the layout name for English) and SECONDARY_LAYOUT='Hebrew', these names need to match the names for your 'language_config.json'
  3. open terminal in project dir and run the command:
chmod +x run.command
  1. Right-click the run.command file and click "Make Alias".

image

To make an "app-like" desktop executable (optional):

  1. Move the alias to the Desktop (or other wanted location).
  2. Copy to clipboard the icon.png image.
  3. Right-click the alias and click "Get Info".
  4. Click the icon in the top left corner of the "Get Info" window and paste the icon.png image.

image

Congratulations! now, you can run the script by double-clicking the alias on the desktop.

image

On running, a terminal window will open and the script will run in the background. you can see when language is changed by the prints in the terminal.

image

to kill the sctipt simply terminate the terminal window.

About

script for automatically changing the keyboard input language based on the specific app preferences

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published