GithubHelp home page GithubHelp logo

sabyrzhan / karabiner-fn-language-switcher Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 11 KB

πŸ‡°πŸ‡Ώβ†”οΈπŸ‡ΊπŸ‡Έ Enable Macbook M1 `fn` key language switching functionality in old Macs with Karabiner

Swift 100.00%

karabiner-fn-language-switcher's Introduction

Language switcher with fn key for Karabiner in non-M1 Macs

Introduction

Old non-M1 Macs dont support switching language with double fn press. But it can be achieved using complex combinations in Karabiner-elements project. However I was not able to achieve this by only using Karabiner complex rules and variables, because it can only toggle to specified language but not between multiple. To achive it I just created a CLI application which is called by Karabiner.

This repository contains:

  • Simple MacOS CLI project that toggles languages (currently hardcoded to toggle between KK <-> ABC)
  • Karabiner complex modification rule (file `double_fn_switch_langage.json)

Installation

  1. Clone this repo and open project in XCode
  2. Modify file main.swift by adding your own language preferences
  3. Build the project:
    • in XCode: archive the project and copy generated LanguageSwitcher somewhere
    • in CLI: run xcodebuild build and copy generated build/Release/LanguageSwitcher somewhere
  4. Specify full path to LanguageSwitcher to shell_command in double_fn_switch_language.json file
  5. Copy double_fn_switch_language.json to ~/.config/karabiner/assets/complex_modifications
  6. Enable rule in Karabiner-elements -> Preferences -> Complex modifications -> Add rule -> Execute LanguageSwitcher in shell
  7. Enjoy!

Tested

  1. Project created and compiled on:
    • MacOS BigSur 11.6.2
    • XCode 13.1
  2. Karabiner-elements 14.3.0

Used resources

(c) 2021

karabiner-fn-language-switcher's People

Contributors

sabyrzhan 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.