Skip to content

2. Configuration and Usage

Aleksander Zaruczewski edited this page Mar 24, 2024 · 1 revision

Configuration

Configuring betterglobekey is straightforward. After installation, a default configuration file is created at ~/.betterglobekey.yaml. This file allows you to customize how the utility functions according to your preferences.

Editing the Configuration

Open ~/.betterglobekey.yaml in your favorite text editor. You'll see the main sections for configuring the input sources and the double press delay.

Input Sources

Input sources are defined under the input_sources section. You can create named collections of input sources that betterglobekey will cycle through.

input_sources:
  default:
    - com.apple.keylayout.US
    - com.apple.keylayout.Russian
  coding:
    - com.apple.keylayout.US
    - com.apple.keylayout.Ukrainian-PC

Each collection can contain one or more input source identifiers. When the Globe key is pressed, betterglobekey switches to the next input source in the current collection.

Finding Available Input Sources

To view all currently available input sources on your macOS, run the following command:

betterglobekey list

This command displays a list of input source identifiers, which you can use to configure your input source collections in ~/.betterglobekey.yaml.

Double Press Delay

The double_press.maximum_delay setting determines the maximum time interval (in milliseconds) between two Globe key presses to be recognized as a double press, allowing you to switch between the collections.

double_press:
  maximum_delay: 500

Adjust this value according to your typing speed and preference.

Applying Changes

After editing the configuration file, restart betterglobekey for the changes to take effect:

brew services restart betterglobekey

Usage

betterglobekey enhances your Globe key with two modes of operation:

Single Press Mode

In this mode, a single press of the Globe key cycles through the input sources within the currently active collection. If you reach the end of the collection, the next press will loop back to the first input source.

Double Press Mode

This mode is activated by pressing the Globe key twice within the double_press.maximum_delay interval. It allows you to switch between different collections of input sources defined in your configuration.

For example, you might have a "default" collection with U.S. and Russian for regular use, an "additional" collection featuring Ukrainian, Finnish, and Japanese for specific needs, and a "coding" collection with ABC Extended and Colemak for programming. A double press of the Globe key allows quick switching between these tailored collections.

Experiment with different configurations and modes to find the setup that best suits your workflow. betterglobekey is designed to make switching between languages and keyboard layouts seamless and intuitive.