asmvik / asmvik/skhd

Output keypresses but using a different input source (language)

Open
#347 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.1k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

I write science texts with many isolated Greek letters, like this: `δ13C`. It's really slow to switch to Greek (even using a single keypress shortcut), type the letter, switch back to English (or forget switching back and type out garbled text).

I'm looking for a way to enable the following behavior: when I type the `d` key, output `d`, unless `left-option` is already pressed down, in which case output `δ`.

I tried the following config: `alt - d : skhd --key z`. That does replace `alt - d` by `z`. Happy so far. But how can I output `δ` instead of `z`? I guess I need to switch input sources in shell, but I'm not sure how to do that. Is there an obvious solution I'm missing, or is it just a matter of hunting down a good way to switch inputs from the command-line?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the shown `alt - d : skhd --key z` configuration and the `skhd --key` command; investigate how macOS input sources can be selected from the shell. Done means holding left-option while pressing d emits δ, while an unmodified d emits d, without leaving the input source changed.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, shell
Domain
cli, desktop, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.