GithubHelp home page GithubHelp logo

weiqiangzheng / kawa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hatashiro/kawa

1.0 1.0 0.0 1.51 MB

A better input source switcher for OS X

Home Page: https://github.com/utatti/kawa

License: MIT License

Swift 98.67% Objective-C 1.33%

kawa's Introduction

logo

Kawa GitHub license GitHub release travis-ci

A better input source switcher for OS X

TL;DR

Kawa helps users to switch between keyboard input sources by user-defined shortcuts.

A little background

I use 3 input sources in my Mac, U.S., 2-Set Korean and Hiragana. When I used to use only 2 sources, it was just fine. I needed to just stroke Command+Space to switch between them. However, when the other was added, it became a mess.

In order to switch an input source to another, Command+Space should be stroked several times. It's mainly because it switches a source to a previously-selected source, and usually we don't always remember what it was. There's another built-in shortcut, Alt+Command+Space, which switch the input to a next language in system order. However, the order should be memorised to avoid always checking which language is current. Although we've memorised the order perfectly, we need to stroke the keys more than twice if the sources are not adjecent. In short, it's a hell.

I'd always thought I needed an app like Kawa before I accidently became into Swift and decided to implement this by myself. I hope others can be helped by Kawa and escape from the input switching hell.

Cheers!

Demo

demo

For better quality, there is a video version of this demo on Vimeo.

Install

Using Homebrew

brew update
brew cask install kawa

Manually

The prebuilt binaries can be found in Releases.

Unzip Kawa.zip and move Kawa.app to Applications.

For CJKV input sources

There is a known bug in the TIS library of macOS that switching keyboard layouts doesn't work well when done programmatically, especially between complex input sources like CJKV.

Kawa workarounded this bug by programmatically doing the followings:

  • Select a target input source
  • If the source is CJKV
    • Switch to the first non-CJKV input source
    • Return to the target input source by sending Select the previous input source shortcut

Thus, to activate the workaround above, the following restrictions should meet.

  1. There is at least one non-CJKV input source in the input source list
  2. The Select the previous input source shortcut should be enabled and set to something
    • It can be set in System Preferences > Keyboard > Shortcuts > Input Sources

Preferences

Preferences can be found in a preference window. The window can be opened by clicking the menubar icon of Kawa or launching Kawa again.

Show menubar icon

Show the icon of Kawa in the OS X menubar. When you click the icon, a preference window will be opened. If this option is unset, the icon will be hidden and the preference window can be opened when launching Kawa again.

Launch Kawa on startup

Add Kawa to startup items.

Show notification on input source change

Show macOS notification on input source change.

Development

We use Carthage as a dependency manager. You can find the latest releases of Carthage here, or just install it with Homebrew.

$ brew update
$ brew install carthage

To clone the Git repository of Kawa and install dependencies:

$ git clone [email protected]:utatti/kawa.git
$ carthage bootstrap

After dependency installation, you can open and build the project with Xcode.

Help!

The application is quite simple and this README contains quite most of it. When you have a problem using Kawa, I would recommend reading this README again, carefully.

If there's still a problem, please upload it as an issue on Issues.

License

Kawa is released under the MIT License.

kawa's People

Contributors

laughedelic avatar humblehacker avatar alldne avatar tpeterw avatar jwmann avatar

Stargazers

zhengweiqiang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.