Jump to content

j2thex

Member
  • Posts

    6
  • Joined

  • Last visited

Reputation Activity

  1. Like
    j2thex got a reaction from ProRock in Can Alfred Do This? Change the keyboard input source for selected text?   
    I made an apple script which switches russian to english and english to russian languages. 
     
    https://github.com/j2thex/keyboard-language-switcher
     
    I use alt+shift+z to switch. So when i misytped a couple of words - i press alt+shift+left and then alt+shift+z 
     
    The script is not perfect, but it's something, a viable alternative to punto switcher
     
    Please help fix bugs
  2. Like
    j2thex reacted to deanishe in Can Alfred Do This? Change the keyboard input source for selected text?   
    You could probably do this via a script assigned to a keyboard shortcut.
     
    If I were trying to do this, I'd do it in four steps:
    Use AppleScript to send the key presses ⌘⇧←  then ⌘X to select the current line and cut the text to the pasteboard. Use a custom script to replace the characters in the cut text with the characters on the same keys when the target keyboard layout is selected, e.g. going from an English layout to a German one, that would mean replacing "y" with "z" and ";" with "ö". Paste the altered text (also using AppleScript). Use this script to switch to the desired input source. For use outside Alfred, I guess you'd want to skip the ⌘⇧← bit and select the text yourself.
×
×
  • Create New...