Coder Social home page Coder Social logo

skhd's Introduction

skhd is a simple hotkey daemon for macOS that focuses on responsiveness and performance. Hotkeys are defined in a text file through a simple DSL. skhd is able to hotload its config file, meaning that hotkeys can be edited and updated live while skhd is running.

skhd uses a pid-file to make sure that only one instance is running at any moment in time. This also allows for the ability to trigger a manual reload of the config file by invoking skhd --reload at any time while an instance of skhd is running. The pid-file is saved as /tmp/skhd_$USER.pid and so the user that is running skhd must have write permission to said path. When running as a service (through launchd) log files can be found at /tmp/skhd_$USER.out.log and /tmp/skhd_$USER.err.log.

list of features

feature skhd
hotload config file [x]
hotkey passthrough [x]
modal hotkey-system [x]
application specific hotkey [x]
blacklist applications [x]
use media-keys as hotkey [x]
synthesize a key-press [x]

Install

The first time skhd is ran, it will request access to the accessibility API.

After access has been granted, the application must be restarted.

Secure Keyboard Entry must be disabled for skhd to receive key-events.

Homebrew:

Requires xcode-8 command-line tools.

  brew install koekeishiya/formulae/skhd
  skhd --start-service

Source:

Requires xcode-8 command-line tools.

  git clone https://github.com/koekeishiya/skhd
  make install      # release version
  make              # debug version

Usage

--install-service: Install launchd service file into ~/Library/LaunchAgents/com.koekeishiya.skhd.plist
    skhd --install-service

--uninstall-service: Remove launchd service file ~/Library/LaunchAgents/com.koekeishiya.skhd.plist
    skhd --uninstall-service

--start-service: Run skhd as a service through launchd
    skhd --start-service

--restart-service: Restart skhd service
    skhd --restart-service

--stop-service: Stop skhd service from running
    skhd --stop-service

-V | --verbose: Output debug information
    skhd -V

-P | --profile: Output profiling information
    skhd -P

-v | --version: Print version number to stdout
    skhd -v

-c | --config: Specify location of config file
    skhd -c ~/.skhdrc

-o | --observe: Output keycode and modifiers of event. Ctrl+C to quit
    skhd -o

-r | --reload: Signal a running instance of skhd to reload its config file
    skhd -r

-h | --no-hotload: Disable system for hotloading config file
    skhd -h

-k | --key: Synthesize a keypress (same syntax as when defining a hotkey)
    skhd -k "shift + alt - 7"

-t | --text: Synthesize a line of text
    skhd -t "hello, worldシ"

Configuration

The default configuration file is located at one of the following places (in order):

  • $XDG_CONFIG_HOME/skhd/skhdrc
  • $HOME/.config/skhd/skhdrc
  • $HOME/.skhdrc

A different location can be specified with the --config | -c argument.

A sample config is available here

A list of all built-in modifier and literal keywords can be found here

A hotkey is written according to the following rules:

hotkey       = <mode> '<' <action> | <action>

mode         = 'name of mode' | <mode> ',' <mode>

action       = <keysym> '[' <proc_map_lst> ']' | <keysym> '->' '[' <proc_map_lst> ']'
               <keysym> ':' <command>          | <keysym> '->' ':' <command>
               <keysym> ';' <mode>             | <keysym> '->' ';' <mode>

keysym       = <mod> '-' <key> | <key>

mod          = 'modifier keyword' | <mod> '+' <mod>

key          = <literal> | <keycode>

literal      = 'single letter or built-in keyword'

keycode      = 'apple keyboard kVK_<Key> values (0x3C)'

proc_map_lst = * <proc_map>

proc_map     = <string> ':' <command> | <string>     '~' |
               '*'      ':' <command> | '*'          '~'

string       = '"' 'sequence of characters' '"'

command      = command is executed through '$SHELL -c' and
               follows valid shell syntax. if the $SHELL environment
               variable is not set, it will default to '/bin/bash'.
               when bash is used, the ';' delimeter can be specified
               to chain commands.

               to allow a command to extend into multiple lines,
               prepend '\' at the end of the previous line.

               an EOL character signifies the end of the bind.

->           = keypress is not consumed by skhd

*            = matches every application not specified in <proc_map_lst>

~            = application is unbound and keypress is forwarded per usual, when specified in a <proc_map>

A mode is declared according to the following rules:


mode_decl = '::' <name> '@' ':' <command> | '::' <name> ':' <command> |
            '::' <name> '@'               | '::' <name>

name      = desired name for this mode,

@         = capture keypresses regardless of being bound to an action

command  = command is executed through '$SHELL -c' and
           follows valid shell syntax. if the $SHELL environment
           variable is not set, it will default to '/bin/bash'.
           when bash is used, the ';' delimeter can be specified
           to chain commands.

           to allow a command to extend into multiple lines,
           prepend '\' at the end of the previous line.

           an EOL character signifies the end of the bind.

General options that configure the behaviour of skhd:

# specify a file that should be included as an additional config-file.
# treated as an absolutepath if the filename begins with '/' otherwise
# the file is relative to the path of the config-file it was loaded from.

.load "/Users/Koe/.config/partial_skhdrc"
.load "partial_skhdrc"

# prevents skhd from monitoring events for listed processes.

.blacklist [
    "terminal"
    "qutebrowser"
    "kitty"
    "google chrome"
]

skhd's People

Contributors

friederbluemle avatar koekeishiya avatar kylef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skhd's Issues

is there a man page?

Hello, great work, but where I can find commands and their description except the default skhdrc?
For example: how can I send window to other workspace and follow the focus?

MPV fails to run when called

Issue

Adding the following config to .skhdrc causes MPV to fail.

cmd + alt - p : mpv -v $(pbpaste)

In fact MPV fails for any link if called from skhd.

Version info

Software Version
Macos 10.13.5
skhd 0.2.2
mpv 0.28.2
youtube-dl 2018.06.19

Attempts

  • Running mpv -v $(pbpaste) on any terminal works fine.
  • Compiling from source doesn't make a difference.
  • Compiling fork_and_exec from hotkey.c and calling it with an MPV command actually works. So I called it with
    "mpv -v https://www.youtube.com/watch?v=D52TF1OtgSE > mpv_success.log"
    and added
cmd + alt - p : mpv -v https://www.youtube.com/watch?v=D52TF1OtgSE > mpv_failure.log

to .skhdrc resulting with the following two files.

mpv_success.log
mpv_failure.log

These files only differ in that the command

/usr/local/bin/youtube-dl --no-warnings -J --flat-playlist --sub-format ass/srt/best --format bestvideo+bestaudio/best --all-subs --no-playlist -- https://www.youtube.com/watch?v=0SWS4M94TiM

fails in one but not the other.

Speculation

It might be the case the skhd is messing with the environment that mpv is running in, this might cause youtube-dl to fail as it's doing.

Change modes and execute commands in one action

I use modes extensively skhd and while customizing my .skhdrc, I've repeatedly found situations where it would be beneficial if I could swap modes after running the command for my hotkey. Let me present two use cases to illustrate. In both cases, I use qes to implement the desired functionality.

Use Case 1: Execute modal command then exit back to default mode

For example, consider the following configuration snippet. The intent of the line is to toggle full screen and then return to the default mode via the qes sequence (ctrl - space toggles my focus mode), so I don't manually have to exit focus mode. I have several types of these commands where I know most of the time I just want to execute it and then return back to default.

:: default  : chunkc border::color 0xff61afef
:: focus  @ : chunkc border::color 0xffe06c75
focus   < ctrl - space ; default
default < ctrl - space ; focus
focus < m : chunkc tiling::window --toggle fullscreen; qes -k "ctrl - space";

The use case essentially replicates a multi-stage keymap, similar to Emacs Ctrl-x KEY binding, where a user defines a keybinding to get to the next set of keybindings, that once executed leaves the user in the original/default mode. It basically has the benefit of modal keymaps without the permanence of the mode.

Use Case 2: Execute modal command that relies on Mac keyboard shortcut

As a second example, I use the following to emulate desktop switching (I do not use fast desktop switching as I do not want to inject Dock code). First, I return to default mode because I capture keystrokes in my modes, then I use a Mission Control Mac keyboard shortcut to switch desktops, and then finally I return to focus mode, so I have can continue executing my focus-based commands.

:: default  : chunkc border::color 0xff61afef
:: focus  @ : chunkc border::color 0xffe06c75
focus   < ctrl - space ; default
default < ctrl - space ; focus
focus < 1 : qes -k "ctrl - space"; qes -k "cmd + alt - 1"; qes -k "ctrl - space";

Proposal

I, personally, have a need for both use cases as I make use of modal keymaps extensively. In some of those cases, I want to return immediately to default mode (use case 1), and in others, I want to stay in the desired mode, but need to escape out to default mode for Mac keyboard shortcuts (use case 2). Although both of these can be implemented using qes, it would be nice if skhd permitted switching modes as part of a command definition.

To maintain backwards compatibility, I think this could be implemented with two small changes to the established syntax rules:

  1. Change all references of <command> to <shell> to make it explicit what is going to be executed. The new use of <command> would represent either a <mode> or a <shell> command.
  2. Then introduce the concept of command plurality with <commands> that are delimited by a , to allow the specification of one or more <command>s to be executed.

The following would be the new rules:

hotkey   = <mode> '<' <action> | <action>

mode     = 'name of mode' | <mode> ',' <mode>

action   = <keysym> <commands> | <keysym> '->' <commands>

commands = <command> | <command> ',' <command>

command  = ':' <shell> | ';' <mode>

Revisiting my original two use cases above, they could be rewritten in the following manner:

focus < m : chunkc tiling::window --toggle fullscreen , ; default
focus < 1 ; default , : qes -k "cmd + alt - 1" , ; focus

For the most part, this would maintain backwards compatibility with the existing file format. The one edge case would be where someone is using the , character as part of an existing shell command.

Thoughts?

v0.1.0 does not work anymore with Modifier - F<x>

I have a lot of shortcut involving some modifiers plus the F row. From version v0.1.0, they stopped working if I start skhd from the terminal, I can see the F literal printed on screen.

Example run (only with not working key printed:

❯❯❯ skhd 
skhd: using config '/Users/bigo/.skhdrc'
hotkey :: #14 {
	mod: 'ctrl'
	mod: 'shift'
	key: 'f11' (0x67)
	cmd: 'm sleep'
}
hotkey :: #35 {
	mod: 'hyper'
	key: 'f11' (0x67)
	cmd: 'osascript $HOME/.bin/crisidev_irc.scpt'
}
hotkey :: #102 {
	mod: 'cmd'
	key: 'f18' (0x4f)
	cmd: 'qes -k "cmd + ctrl + alt - f1"'
}
hotkey :: #103 {
	mod: 'cmd'
	key: 'f1' (0x7a)
	cmd: 'qes -k "cmd + ctrl + alt - f9"'
}
hotkey :: #104 {
	mod: 'cmd'
	key: 'f2' (0x78)
	cmd: 'qes -k "cmd + ctrl + alt - f2"'
}
hotkey :: #109 {
	mod: 'cmd'
	key: 'f4' (0x76)
	cmd: 'qes -k "cmd + ctrl + alt - f5"'
}
hotkey :: #110 {
	mod: 'cmd'
	key: 'f3' (0x63)
	cmd: 'qes -k "cmd + ctrl + alt - f11"'
}
hotkey :: #112 {
	mod: 'cmd'
	key: 'f5' (0x60)
	cmd: 'qes -k "cmd + ctrl + alt - f8"'
}
hotkey :: #115 {
	mod: 'hyper'
	key: 'f18' (0x4f)
	cmd: 'chunkc tiling::window -d 1'
}
hotkey :: #116 {
	mod: 'hyper'
	key: 'f1' (0x7a)
	cmd: 'chunkc tiling::window -d 9'
}
hotkey :: #117 {
	mod: 'hyper'
	key: 'f2' (0x78)
	cmd: 'chunkc tiling::window -d 2'
}
hotkey :: #122 {
	mod: 'hyper'
	key: 'f4' (0x76)
	cmd: 'chunkc tiling::window -d 5'
}
hotkey :: #123 {
	mod: 'hyper'
	key: 'f3' (0x63)
	cmd: 'chunkc tiling::window -d 11'
}
hotkey :: #125 {
	mod: 'hyper'
	key: 'f5' (0x60)
	cmd: 'chunkc tiling::window -d 8'
}
hotload: watching file '.skhdrc' in directory '/Users/bigo'

If I press CMD+F5, it prints the literal on the terminal:

^[[15~^[[15~^[[15~^[[15~^[[15~

I think there has been a regression :)

Thanks for the amazing work, I was waiting for modal support here!

Unable to use Cmd + Number on last HEAD

Hello,
part of my workflow is to switch desktop using Cmd+number. This triggers a qes emit keypress which actually triggers mission control and switches my desktop in a consistent way when using different monitors setups.

Latest HEAD (9096762) is not working anymore for me when I hit Cmd+number. If I go back to stable (0.0.10) it works again. All other key binding works normally.

Here is the debug info if I start skhd from my terminal (no errors). I think there is a regression somewhere :)

❯❯❯ ~ skhd
skhd: using config '/Users/matbigoi/.skhdrc'
hotkey :: #2 {
        mod: 'cmd'
        mod: 'alt'
        key: 'q' (0x0c)
        cmd: 'PATH=$HOME/.pyenv/versions/3.6.4/bin:$PATH $HOME/.bin/chunkwm-profile --stop'
}
hotkey :: #5 {
        mod: 'cmd'
        mod: 'alt'
        key: 's' (0x01)
        cmd: 'PATH=$HOME/.pyenv/versions/3.6.4/bin:$PATH $HOME/.bin/chunkwm-profile --start'
}
hotkey :: #8 {
        mod: 'cmd'
        mod: 'alt'
        key: 'r' (0x0f)
        cmd: 'bash $HOME/.chunkwmrc'
}
hotkey :: #11 {
        mod: 'ctrl'
        mod: 'shift'
        key: 'f12' (0x6f)
        cmd: 'm screensaver'
}
hotkey :: #14 {
        mod: 'ctrl'
        mod: 'shift'
        key: 'f11' (0x67)
        cmd: 'm sleep'
}
hotkey :: #17 {
        mod: 'hyper'
        key: 'b' (0x0b)
        cmd: 'chunkc tiling::desktop --layout bsp'
}
hotkey :: #20 {
        mod: 'hyper'
        key: 'm' (0x2e)
        cmd: 'chunkc tiling::desktop --layout monocle'
}
hotkey :: #23 {
        mod: 'hyper'
        key: 'n' (0x2d)
        cmd: 'chunkc tiling::desktop --layout float'
}
hotkey :: #26 {
        mod: 'hyper'
        key: 'r' (0x0f)
        cmd: 'chunkc tiling::desktop --rotate 90'
}
hotkey :: #29 {
        mod: 'hyper'
        key: 'p' (0x23)
        cmd: 'pass -c login'
}
hotkey :: #32 {
        mod: 'hyper'
        key: 'return' (0x24)
        cmd: 'osascript $HOME/.bin/iterm.scpt'
}
hotkey :: #35 {
        mod: 'hyper'
        key: 'f11' (0x67)
        cmd: 'osascript $HOME/.bin/crisidev_irc.scpt'
}
hotkey :: #38 {
        mod: 'hyper'
        key: 'f12' (0x6f)
        cmd: 'osascript $HOME/.bin/other_irc.scpt'
}
hotkey :: #41 {
        mod: 'hyper'
        key: 'v' (0x09)
        cmd: 'open -a VimR'
}
hotkey :: #44 {
        mod: 'hyper'
        key: 'space' (0x31)
        cmd: 'osascript $HOME/.bin/finder.scpt'
}
hotkey :: #47 {
        mod: 'shift'
        mod: 'ctrl'
        key: 'l' (0x25)
        cmd: 'PATH=$HOME/.pyenv/versions/3.6.4/bin:$PATH $HOME/.bin/chunkwm-profile -p laptop'
}
hotkey :: #50 {
        mod: 'shift'
        mod: 'ctrl'
        key: 'm' (0x2e)
        cmd: 'PATH=$HOME/.pyenv/versions/3.6.4/bin:$PATH $HOME/.bin/chunkwm-profile -p 1monitor'
}
hotkey :: #53 {
        mod: 'shift'
        mod: 'ctrl'
        key: 'n' (0x2d)
        cmd: 'PATH=$HOME/.pyenv/versions/3.6.4/bin:$PATH $HOME/.bin/chunkwm-profile -p 2monitor'
}
hotkey :: #56 {
        mod: 'hyper'
        key: 'f' (0x03)
        cmd: 'chunkc tiling::window --toggle fullscreen'
}
hotkey :: #59 {
        mod: 'hyper'
        key: 'h' (0x04)
        cmd: 'chunkc tiling::window --toggle native-fullscreen'
}
hotkey :: #62 {
        mod: 'hyper'
        key: 'd' (0x02)
        cmd: 'chunkc tiling::window --toggle parent'
}
hotkey :: #65 {
        mod: 'hyper'
        key: 's' (0x01)
        cmd: 'chunkc tiling::window --toggle float'
}
hotkey :: #68 {
        mod: 'hyper'
        key: 'g' (0x05)
        cmd: 'chunkc tiling::window --toggle split'
}
hotkey :: #71 {
        mod: 'hyper'
        key: 'a' (0x00)
        cmd: 'chunkc tiling::desktop --equalize'
}
hotkey :: #74 {
        mod: 'hyper'
        key: 'b' (0x0b)
        cmd: 'chunkc tiling::window --focus biggest'
}
hotkey :: #77 {
        mod: 'ctrl'
        key: 'up' (0x7e)
        cmd: '$HOME/.bin/chunkwm-focus up'
}
hotkey :: #78 {
        mod: 'ctrl'
        key: 'down' (0x7d)
        cmd: '$HOME/.bin/chunkwm-focus down'
}
hotkey :: #79 {
        mod: 'ctrl'
        key: 'left' (0x7b)
        cmd: '$HOME/.bin/chunkwm-focus left'
}
hotkey :: #80 {
        mod: 'ctrl'
        key: 'right' (0x7c)
        cmd: '$HOME/.bin/chunkwm-focus right'
}
hotkey :: #83 {
        mod: 'cmd'
        mod: 'alt'
        key: 'left' (0x7b)
        cmd: 'chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge west; chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge east'
}
hotkey :: #84 {
        mod: 'cmd'
        mod: 'alt'
        key: 'up' (0x7e)
        cmd: 'chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge north; chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge south'
}
hotkey :: #85 {
        mod: 'cmd'
        mod: 'alt'
        key: 'down' (0x7d)
        cmd: 'chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge south; chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge north'
}
hotkey :: #86 {
        mod: 'cmd'
        mod: 'alt'
        key: 'right' (0x7c)
        cmd: 'chunkc tiling::window --use-temporary-ratio 0.05 --adjust-window-edge east; chunkc tiling::window --use-temporary-ratio -0.05 --adjust-window-edge west'
}
hotkey :: #89 {
        mod: 'cmd'
        key: 'f18' (0x4f)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f1"'
}
hotkey :: #90 {
        mod: 'cmd'
        key: 'f1' (0x7a)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f9"'
}
hotkey :: #91 {
        mod: 'cmd'
        key: 'f2' (0x78)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f2"'
}
hotkey :: #92 {
        mod: 'cmd'
        key: '1' (0x53)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f10"'
}
hotkey :: #93 {
        mod: 'cmd'
        key: '2' (0x54)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f3"'
}
hotkey :: #94 {
        mod: 'cmd'
        key: '3' (0x55)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f6"'
}
hotkey :: #95 {
        mod: 'cmd'
        key: '4' (0x56)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f4"'
}
hotkey :: #96 {
        mod: 'cmd'
        key: 'f4' (0x76)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f5"'
}
hotkey :: #97 {
        mod: 'cmd'
        key: 'f3' (0x63)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f11"'
}
hotkey :: #98 {
        mod: 'cmd'
        key: '5' (0x57)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f7"'
}
hotkey :: #99 {
        mod: 'cmd'
        key: 'f5' (0x60)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f8"'
}
hotkey :: #102 {
        mod: 'hyper'
        key: 'f18' (0x4f)
        cmd: 'chunkc tiling::window -d 1'
}
hotkey :: #103 {
        mod: 'hyper'
        key: 'f1' (0x7a)
        cmd: 'chunkc tiling::window -d 9'
}
hotkey :: #104 {
        mod: 'hyper'
        key: 'f2' (0x78)
        cmd: 'chunkc tiling::window -d 2'
}
hotkey :: #105 {
        mod: 'hyper'
        key: '1' (0x53)
        cmd: 'chunkc tiling::window -d 10'
}
hotkey :: #106 {
        mod: 'hyper'
        key: '2' (0x54)
        cmd: 'chunkc tiling::window -d 3'
}
hotkey :: #107 {
        mod: 'hyper'
        key: '3' (0x55)
        cmd: 'chunkc tiling::window -d 6'
}
hotkey :: #108 {
        mod: 'hyper'
        key: '4' (0x56)
        cmd: 'chunkc tiling::window -d 4'
}
hotkey :: #109 {
        mod: 'hyper'
        key: 'f4' (0x76)
        cmd: 'chunkc tiling::window -d 5'
}
hotkey :: #110 {
        mod: 'hyper'
        key: 'f3' (0x63)
        cmd: 'chunkc tiling::window -d 11'
}
hotkey :: #111 {
        mod: 'hyper'
        key: '5' (0x57)
        cmd: 'chunkc tiling::window -d 7'
}
hotkey :: #112 {
        mod: 'hyper'
        key: 'f5' (0x60)
        cmd: 'chunkc tiling::window -d 8'
}
hotload: watching file '.skhdrc' in directory '/Users/matbigoi'

The non working bindings are:

hotkey :: #92 {
        mod: 'cmd'
        key: '1' (0x53)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f10"'
}
hotkey :: #93 {
        mod: 'cmd'
        key: '2' (0x54)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f3"'
}
hotkey :: #94 {
        mod: 'cmd'
        key: '3' (0x55)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f6"'
}
hotkey :: #95 {
        mod: 'cmd'
        key: '4' (0x56)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f4"'
}
hotkey :: #98 {
        mod: 'cmd'
        key: '5' (0x57)
        cmd: '$HOME/.bin/qes -k "cmd + ctrl + alt - f7"'
}

some keys trigger the FN modifier flag for some reason

Events triggered by keys such as all function keys (f*), and the arrow keys have the fn modifier flag set for some reason, even though the fn modifier is not pressed. The same is true even with the mission control option "Use F1, F2, etc keys as standard function keys".

It is tedious to have to manually specify fn as a modifier in these binds.
An option is to automatically flag binds using these literals with the fn modifier during parsetime,
however this could make it unclear to the users that these literals CAN NOT be used with fn as a modifier. e.g:alt - left and fn + alt - left are equivalent.

Keybinding with F* does not work anymore

Hello,
after the cleanup you did, all my keybinding using F* are not working anymore. I usually move through desktops with cmd + f[1-8] and they stopped working when I switched from stable 0.0.8 to HEAD.

I think there has been a regression. 0.0.8 works fine.

If I start HEAD version, the keystrokes are printed on the terminal. It seems skhd is not able to grab the keybinding when f* is involved.

If I change the keybinding to use numbers, like cmd + [1-8], everything works properly also with HEAD version.

Segmentation fault when using key literals

This seems related to #2 Segfaults when using function key literals.

skhd segfaults whenever I try to use key literals in my .skhdrc. I have no issue when I switch them out for the keycodes.

I installed skhd version 0.0.7 using the --HEAD flag in homebrew on OSX 10.11.6


What I see in the terminal

When using keycodes:

$ skhd
skhd: using config '/Users/xavier/.skhdrc'
(#39) hotkey :: {
	mod: 'ralt'
	key: '0x04' (0x04)
	cmd: 'chunkc tiling::window --focus west'
}
hotload: watching file '.skhdrc' in directory '/Users/xavier'

When using literals:

$ skhd
skhd: using config '/Users/xavier/.skhdrc'
(#44) hotkey :: {
	mod: 'ralt'
Segmentation fault: 11

Allow any combination of keys to be more flexible

Is it possible to do keybinds that don't involve only the traditional modifier keys?

For example, instead of having to rebind Caps to Hyper and not having anymore modifiers left, it would be far more flexible to be able to bind Caps to say...F20 and still have modifiers left.

Desktop switching behavior with modal support

For consistency of how I use skhd, I want to use my modal keybindings to switch desktops, so I'm "faking" it by:

  • using qes to escape out of my focus mode (note: I capture keystrokes in all my modes via @ so it would gobble up any Mac keyboard shortcuts if I didn't),
  • sending the Mac keyboard shortcut to switch desktops,
  • and then using qes again to toggle back into focus mode.

This works well except that border color does not change upon entry into my focus mode. I believe this is due to a timing issue with the mission control animations.

I "fixed" this by adding an explicit sleep (shorter for explicit desktop specification and longer for next/prev desktop as the animation speed varies), and then manually calling chunkc to set the border color again. It works, but it seems hacky. Is there a better way of handling this without having to resort to using fast desktop switching as I don't want to inject code into my Dock.

Thanks for such as awesome window manager!

focus                     < 1           : qes -k "ctrl - space"; qes -k "cmd + alt - 1"; qes -k "ctrl - space"; sleep 0.4; chunkc border::color 0xffe06c75
focus                     < 2           : qes -k "ctrl - space"; qes -k "cmd + alt - 2"; qes -k "ctrl - space"; sleep 0.4; chunkc border::color 0xffe06c75
focus                     < 3           : qes -k "ctrl - space"; qes -k "cmd + alt - 3"; qes -k "ctrl - space"; sleep 0.4; chunkc border::color 0xffe06c75
focus                     < tab         : qes -k "ctrl - space"; qes -k "ctrl - right"; qes -k "ctrl - space"; sleep 0.75; chunkc border::color 0xffe06c75
focus                     < shift - tab : qes -k "ctrl - space"; qes -k "ctrl - left"; qes -k "ctrl - space"; sleep 0.75; chunkc border::color 0xffe06c75

Difference between - and +

Konge prosjekt!

Got everything working, but can't seem to find the difference between these two operators.

 keysym = <mod> '-' <key> | <key>
 mod = 'built-in mod keyword' | <mod> '+' <mod>

From testing I've found that shift - t means holding down both keys at the same time. However, I don't understand what shift + t means? Can't seem to get the latter to work.

Segfaults on last git version

I guess this is related to the Os vs O2 optimization, but last git version (a746b34) is segfaulting:

skhd: using config '/Users/bigo/.skhdrc'
(#2) hotkey :: {
	mod: 'cmd'
	mod: 'alt'
	key: 'q' (0x0c)
[1]    98392 segmentation fault  skhd

Segmentation Fault

I'm currently switching from kwm+khd to chunkwm+skhd.

Everything is working fine on my iMac, but skhd is giving me a segmentation fault with the sample configuration on Retina MacbookPro

➜ ~ skhd
skhd: using config '/Users/deivuh/.skhdrc'
(#34) hotkey :: {
mod: 'cmd'
key: 'return' (0x24)
cmd: 'open -na /Applications/Kitty.app'
}
(#37) hotkey :: {
mod: 'alt'
key: 'w' (0x0d)
[1] 28559 segmentation fault skhd

Howto : launch single instant of apps

Hello

I've been trying for hours to launch a single instance of iTerm2 and qutebrowser, and ranger
the task seems impossible

currently I manged to luanch iTerm app with :
alt - return : open -na /Applications/iTerm.app

However, it launch new app and also bother me with choose profile window.

I tried the following and also it didn't fix it :
alt - return : open -na /Applications/iTerm.app/MacOs/iTerm2
and for qutebrowser, and ranger mpv-youtube

I have no idea how to open them with shortcuts .
thanks

Is there are support meta or leader key?

I using skhd and I really like it.
But some hotkey mappings are conflicts with mapping in other applications.

Is there a config for meta key?

For example, I press Ctrl+a and then d like in tmux
or ctrl+w then left arrow like vim.

Passthrough `->` not working

I have a switcher mode I use to switch desktops, and in khd I used to map a key to the Mission Control hotkey via the passthrough mechanism. In skhd I'm trying to do this as well:

:: switcher @ : chunkc border::color 0xddbdd322
switcher <  ctrl - left    -> :   true
switcher <  ctrl - right   -> :   true
switcher <  w :   qes -k "ctrl - left"
switcher <  e :   qes -k "ctrl - right"

Unfortunately the w and e hotkeys here don't trigger the desktop switching behavior as they did in khd.

Media Key Support

Hi! I'd really like to be able to bind commands to media keys. #featurerequest

prevent running as root

if we are running as the root user, abort.

skhd uses a fork -> execp model, causing executed commands to inherit root permissions.

Per-application opt-out of all mappings?

I love chunkwm and skhd. I also like i3, which I run in a VM on my mac. It's a little painful keeping the keyboard mappings for chunkwm from swallowing those of skhd. I think if there were a way to configure skhd to completely ignore an application it would make it a lot easier to manage this particular use case. Thoughts?

Support key aliases / hyper

I like binding all wm related commands to a hyper mod (cmd + alt + ctrl + shift) so I find myself having to type that out for every new hotkey:

...
cmd + alt + ctrl + shift - h : chunkc tiling::window --focus west
cmd + alt + ctrl + shift - j : chunkc tiling::window --focus south
cmd + alt + ctrl + shift - k : chunkc tiling::window --focus north
cmd + alt + ctrl + shift - l : chunkc tiling::window --focus east
...

It would be nice to have a way to define aliases like:

hyper := cmd + alt + ctrl + shift
hyper - h : chunkc tiling::window --focus west

Alternatively having hyper available as a mod key would probably also work...

Show name of process keeping "Secure Keyboard Entry" enabled

Ref #48

We can use the IOReg API to locate the PID of the process that has enabled secure keyboard entry, and can use that information to identify other information about the process that keeps skhd from working.

When this is done, it would make sense to NOT prevent skhd from starting because of this error, but have it create a notification in the notification-center or some other form of pop-up notification.
This could be something like:

Application ".." with bundle ".." has activated Secure Keyboard Entry and prevents skhd from intercepting key-events

Ideally, we would also be able to track whether Secure Keyboard Entry gets activated and/or deactivated and have said pop-up notification happen in these cases as well.

This would prevent the seemingly silent failure that people who run skhd through launchservices currently experience.

--

No ETA for when I can be bothered looking into this. Contributions are welcome if anyone is interested in trying to implement this.

Related Apple documentation:
https://developer.apple.com/library/archive/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/TheRegistry/TheRegistry.html

https://developer.apple.com/documentation/iokit/iokitlib_h?language=objc

https://stackoverflow.com/questions/16922158/how-do-i-iterate-through-io-kits-keys

Allow modes to use keywords

I want to preface with if this is not possible please feel free to just close this GHI.

I noticed when converting my khdrc to my skhdrc I could no longer use my insert mode name.

My Previous khdrc

khd mode prefix prefix on
khd mode prefix timeout 0.5

# set border color for different modes
khd mode default on_enter chunkc border::color 0xFF6699CC
khd mode prefix on_enter chunkc border::color 0xFFFAC863
khd mode manage on_enter chunkc border::color 0xFFC594C5
khd mode insert on_enter chunkc border::color 0xFFF99157

ctrl - k                  : khd -e "mode activate prefix"
prefix - i                : khd -e "mode activate insert" ; khd -e "void_unlisted_bind off"
prefix - m                : khd -e "mode activate manage"
manage - 0x35             : khd -e "mode activate default"
insert - 0x35             : khd -e "mode activate default" ; khd -e "void_unlisted_bind on"

My desired skhdrc

:: default    : chunkc border::color 0xFF6699CC
:: prefix @   : chunkc border::color 0xFFFAC863
:: insert     : chunkc border::color 0xFFF99157
:: manage @   : chunkc border::color 0xFFC594C5

prefix, insert, manage  < escape    ; default
ctrl - k                            ; prefix
prefix                  < i         ; insert
prefix                  < m         ; manage

However I noticed that skhd would fail with this error

#66:4 expected identifier, but got 'insert'

I changed insert to nobind and it worked, but the error was unexpected, since the syntax for modes mean that it shouldn't care about what the mode is called

This is no huge deal, and basically my only issue converting aside from lack of prefix timeout, which I proposed a solution for here #37 (comment)

SKHD not working at all

I have...

  • Enabled accessibility access
  • Running brew services list tells me that skhd is working
  • Secure keyboard entry is disabled
  • chunkwm is working
  • Skdhrc is present and valid

And I'm not sure at all why everything is still failing. Could it be that one of my chunkwm plugins failed to load?

Trackpad Gesture Support

Somewhat of a weird suggestion maybe, but would you be open to expand this tool's functionality to monitor specific trackpad gestures? (e.g. four finger taps, various swipes, "tip-taps") This tool has largely replaced the paid app bettertouchtool for me, except that it lacks binding trackpad gestures to commands. And because running both seems wasteful, I prefer skhd's way of configuration and skdh seems less recourse intensive, I would really like to use it for trackpad monitoring as well. Trackpad gesutres can be monitored through some sort of private API. I would be interested in implementing this functionality myself.

As not really everyone will need this probably, it seems more resource friendly to have a switch to enable trackpad gestures.

segfault when built with extra hardening flags

skhd: using config '/etc/skhdrc'
(#2) hotkey :: {
        mod: 'cmd'
        key: 'return' (0x24)
        cmd: 'open -na /Applications/Kitty.app'
}
(#5) hotkey :: {
        mod: 'alt'
Abort trap: 6

These are the extra extra flags that get added by the hardening. Initially I thought this was this the extra -O flag, but disabling the fortify flags isn't enough.

@@ -1,5 +1,11 @@
-clang src/skhd.c -std=c99 -O3 -framework Carbon -o /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-skhd-0.0.10/bin/skhd
+clang src/skhd.c -std=c99 -O3 -framework Carbon -o /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-skhd-0.0.10/bin/skhd
+HARDENING: enabling fortify
+HARDENING: enabling stackprotector
+HARDENING: enabling pic
+HARDENING: enabling strictoverflow
+HARDENING: enabling format
 extra flags before to /nix/store/insiq14mv3l2lsb90d8671qqda9i75d4-clang-5.0.1/bin/clang:
   ''
 original flags to /nix/store/insiq14mv3l2lsb90d8671qqda9i75d4-clang-5.0.1/bin/clang:
@@ -9,7 +15,7 @@
   -framework
   Carbon
   -o
-  /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-skhd-0.0.10/bin/skhd
+  /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-skhd-0.0.10/bin/skhd
 extra flags after to /nix/store/insiq14mv3l2lsb90d8671qqda9i75d4-clang-5.0.1/bin/clang:
   -B/nix/store/6r5bk2qiq7m6n1fr7khf7p1xz26l2lqy-clang-5.0.1-lib/lib
   -B/nix/store/lvbg3qxa84bck05k425mj5n4hxx2n60n-Libsystem-osx-10.11.6/lib/
@@ -88,6 +94,16 @@
   -F/nix/store/illzh78sjn4g607ad5ikyhyq3snp5jhq-apple-framework-OpenGL/Library/Frameworks
   -F/nix/store/6ixzazaqm0pw364fzl0r4dvbaj55z49x-apple-framework-OpenCL/Library/Frameworks
   -F/nix/store/g94jv2hb0sadznj8dy39vxdvp6cj35z5-CF-osx-10.10.5/Library/Frameworks
+  -O2
+  -D_FORTIFY_SOURCE=2
+  -fstack-protector-strong
+  --param
+  ssp-buffer-size=4
+  -fPIC
+  -fno-strict-overflow
+  -Wformat
+  -Wformat-security
+  -Werror=format-security
   -L/nix/store/j6ifwrr83k1c5nmjfx1p63nydpqsbqd6-libc++-5.0.1/lib
   -L/nix/store/r5vgpicc9m7niyjxa0rc30raxyd58dsl-objc4-osx-10.11.6/lib
   -L/nix/store/j6ifwrr83k1c5nmjfx1p63nydpqsbqd6-libc++-5.0.1/lib

/cc @peel

Segfaults when using Function keys literals

Skhd segfaults when using function keys literals. Maybe I do not understand properly the syntax :(

Here's what happen:

❯❯❯ ~ skhd
skhd: using config '/Users/bigo/.skhdrc'
(#2) hotkey :: {
	mod: 'cmd'
	mod: 'alt'
	key: 'q' (12)
	cmd: 'brew services stop chunkwm'
}
(#5) hotkey :: {
	mod: 'cmd'
	mod: 'alt'
	key: 'r' (15)
	cmd: 'bash $HOME/.chunkwmrc'
}
(#8) hotkey :: {
	mod: 'cmd'
	mod: 'alt'
	key: 'k' (40)
	cmd: 'khd -e "reload"'
}
(#11) hotkey :: {
	mod: 'cmd'
	mod: 'alt'
	key: 'u' (32)
	cmd: 'bash -c "LPID=$(pgrep -f bersicht); kill $LPID; open -a Übersicht"'
}
(#14) hotkey :: {
	mod: 'ctrl'
	mod: 'shift'
	key: 'f' (3)
(#14:17) expected token 'Token_Command', but got '1'
[1]    9304 segmentation fault  skhd

And the config line causing the segfault is:

# block screen
ctrl + shift - f12                       :    m screensaver

application specific hotkeys

Kind of similar to what was done in khd prior.

Have not decided how this is going to work, but currently thinking something as follows:

cmd - f [
    "notes"   : <some_command>
    "firefox" : <some_other_command>
    "finder"  : <some_totally_unrelated_command>
]

This will allow one bind to do various actions depending on the active application, or none if the application is not listed.

Note that spacing / indentation above is purely for readability, EXCEPT that commands MUST end with an EOL character. As such, you'd have to do a line delimeter before the next application can be specified.

An issue with this syntax is that it can't really support the "run command for all applications NOT listed" in a nice way (but I'm not sure if I care too much about that anyway).

Segmentation fault: 11

Hi, i'm getting a SEGFAULT when running skhd 0.0.10 in a terminal on El Capitan 10.11.6.
The config file is the one from the examples dir, unmodified.

~> brew install skhd
Updating Homebrew...
==> Installing skhd from koekeishiya/formulae
==> Downloading https://github.com/koekeishiya/skhd/archive/v0.0.10.zip
Already downloaded: /Users/rleblic/Library/Caches/Homebrew/skhd-0.0.10.zip
==> make install
==> Caveats
Copy the example configuration into your home directory:
  cp /usr/local/opt/skhd/share/skhd/examples/skhdrc ~/.skhdrc

If the formula has been built with --with-logging, logs will be found in
  /usr/local/var/log/skhd/skhd.[out|err].log

To have launchd start koekeishiya/formulae/skhd now and restart at login:
  brew services start koekeishiya/formulae/skhd
Or, if you don't want/need a background service you can just run:
  skhd
==> Summary
🍺  /usr/local/Cellar/skhd/0.0.10: 7 files, 51KB, built in 2 seconds

~> skhd
skhd: using config '/Users/rleblic/.skhdrc'
(#34) hotkey :: {
	mod: 'cmd'
	key: 'return' (0x24)
	cmd: 'open -na /Applications/Kitty.app'
}
(#37) hotkey :: {
	mod: 'alt'
fish: 'skhd' terminated by signal SIGSEGV (Address boundary error)

Recurring "Accessibility Access" requests under macOS Mojave

I am under macOS Mojave 10.14 and skhd (v. 0.3.0) has restated prompting "Accessibility Access", despite being already granted access.

Deselecting and selecting skhd from the list of apps from Security & Privacy in System Preferences had no effect.

Long Delay before Action

Hi guys, - sorry if I'm making noise - I can get skhd to work but weirdly it gives me a 1-2s delay before actually executing my action. I've tried a minimalistic ~/.skhdrc:

alt - f : echo -e "\a"

# change focus
alt - h : chunkc tiling::window --focus west
alt - j : chunkc tiling::window --focus south
alt - k : chunkc tiling::window --focus north
alt - l : chunkc tiling::window --focus east

I know the problem isn't on chunkc since the beep also takes about a second to come out - any ideas??

Using skhd 0.2.2 on Hish Sierra.

Not working at all

I'm on macos highsierra trying to run skhd with chunkwm. Chunkwm is working fine but skhd doesn't seem to be registering any keypresses for anything. I've copied the default configs and the process is showing as running in brew services list. I can't see either a skhd.out or skhd.err in the /tmp directory. Please advise.

Making iTerm window spawning smoother

If I simply replace Kitty with iTerm in the example config, I end up spawning a lot of new iTerm.app processes instead of simply creating new windows using the old process:

hyper - return : open -na /Applications/iTerm.app

I've therefore tried to use osascript to activate iterm and inject the command myself:

hyper - return : osascript -e 'tell application "iTerm" to activate' -e 'tell application "System Events" to tell process "iTerm" to keystroke "n" using command down'

however I don't get any visual feedback. The logs at /usr/local/var/log/skhd/ are also empty.

This is also the case when I put the command in a bash script in ~/bin and I try to run that with

hyper - return: bash ~/bin/my_script

FYI, I'm running High Sierra and I have installed skhd from homebrew.

Merge qes into skhd

As the API we use for synthesizing keypresses require the process to have accessibility access enabled in Mojave, I'll probably merge that code into skhd itself. Another reason is that the parsing code is identical, and it is not really any overhead for adding this to skhd.

Additionally, this will simplify the process for people that wish to implement a prefix-mode in skhd, as they no longer have to pull down an additional dependency (qes).

modal support

I've come to realize that modal support can be added in a way that will not cause significant any performance degradation , if noticeable at all.

This is achieved by adding a separate operator (e.g: ; instead of :) to identify an internally defined command, rather than something to be ran through $SHELL -c. By doing this, skhd will not require input at runtime to simply switch into another mode (khd uses a unix domain socket primarily for this functionality).

As there can only be one active mode at a time and because that mode can only change internally by performing a registered bind; this system is lock-free. Because the datastructures for modes and their associated hotkeys are built during parse-time, the only performance impact that matters is during hotkey execution.

The extra work we have to do is simply checking if the command is an internal command or external command. If it's an internal command we call through a function pointer (validation and lookup happens during parsing), and if it is an external command we do the old logic.
This happens after we get a hotkey-match, and will not impact the checking of keys themselves.

The suggested mode implementation in skhd will NOT provide the prefix-timer (timeout based modes) that khd currently does.

Another issue in khd with regards to modal support is the terrible syntax. The grammar that khd implements is not really defined, whereas in skhd it is.

Syntax for mode-definition:

# define mode 'switcher' with an on_enter command
:: switcher : chunkc border::color 0xff24ccaa

# define modes without an on_enter command
:: swap
:: focus

A mode must be defined as specified above, before it can be utilized.
Failure to do so will result in a parse error.

Hotkey syntax extension for modal support

# hotkey   = <mode> '<' <action> | <action>
#
# mode     = <mode> | <mode> ',' <mode>
#
# action   = <keysym> ':' <command> |
#            <keysym> '->' ':' <command>


# adds the defined hotkey to all specified modes
switcher, swap, focus < ctrl - f ; switcher

# adds hotkey to mode 'focus'
focus < alt - l : chunkc tiling::window --focus east

# old syntax; adds hotkey to the 'default' mode
alt - l : chunkc tiling::window --focus east

Query which mode is activated

Is there a way to query which mode is currently active? IIRC in KHD, the command khd -e "print mode" will output the current active mode.

Can't hotload config file if it is a symlink

Great project! I'm on Mac OSX 10.11 and using skhd to control chunkwm.

If ~/.skhdrc is a symlink, then it can't hotload the config file, and I have to do brew services restart skhd to see the changes. If ~/.skhdrc is a regular file, hotloading works just fine.

some keymaps ignore modifiers

I have the mapping shift + ctrl - t : chunkc tiling::window --swap west.

However, with the HEAD build of skhd using Homebrew, pressing the t key by itself causes the mapping to execute, which makes the key worthless.

keywords (modifiers and literals)

modifiers (<mod>):

fn

cmd
lcmd
rcmd

shift
lshift
rshift

alt
lalt
ralt

ctrl
lctrl
rctrl

hyper (cmd + shift + alt + ctrl)

meh (shift + alt + ctrl)

key literals:

"return"     (kVK_Return)
"tab"        (kVK_Tab)
"space"      (kVK_Space)
"backspace"  (kVK_Delete)
"escape"     (kVK_Escape)

The following keys can not be used with the fn-modifier:

"delete"     (kVK_ForwardDelete)
"home"       (kVK_Home)
"end"        (kVK_End)
"pageup"     (kVK_PageUp)
"pagedown"   (kVK_PageDown)
"insert"     (kVK_Help)
"left"       (kVK_LeftArrow)
"right"      (kVK_RightArrow)
"up"         (kVK_UpArrow)
"down"       (kVK_DownArrow)
"f1"         (kVK_F1)
"f2"         (kVK_F2)
"f3"         (kVK_F3)
"f4"         (kVK_F4)
"f5"         (kVK_F5)
"f6"         (kVK_F6)
"f7"         (kVK_F7)
"f8"         (kVK_F8)
"f9"         (kVK_F9)
"f10"        (kVK_F10)
"f11"        (kVK_F11)
"f12"        (kVK_F12)
"f13"        (kVK_F13)
"f14"        (kVK_F14)
"f15"        (kVK_F15)
"f16"        (kVK_F16)
"f17"        (kVK_F17)
"f18"        (kVK_F18)
"f19"        (kVK_F19)
"f20"        (kVK_F20)
 
"sound_up"          (NX_KEYTYPE_SOUND_UP)
"sound_down"        (NX_KEYTYPE_SOUND_DOWN)
"mute"              (NX_KEYTYPE_MUTE)
"play"              (NX_KEYTYPE_PLAY)            
"previous"          (NX_KEYTYPE_PREVIOUS)        
"next"              (NX_KEYTYPE_NEXT)
"rewind"            (NX_KEYTYPE_REWIND)          
"fast"              (NX_KEYTYPE_FAST)            
"brightness_up"     (NX_KEYTYPE_BRIGHTNESS_UP)
"brightness_down"   (NX_KEYTYPE_BRIGHTNESS_DOWN)
"illumination_up"   (NX_KEYTYPE_ILLUMINATION_UP) 
"illumination_down" (NX_KEYTYPE_ILLUMINATION_DOWN)

keycodes:
apple_keyboard

OR

Launch skhd in observer mode: skhd --observe or skhd -o. Press ctrl+c to quit.

Help for a newbie

Hi, first of all thank you koekeishiya for your work and your two awesome wm.
I have a stupid question, how can i override native macos hotkeys with shkd ones. I know that i can disable some of them in preferences, but i dont find the option with others like hidding (cmd + h) and i want it for focus the left window!

skhd aborting because of false secure keyboard entry error

When I try and start skhd from the CLI it aborts with

skhd: secure keyboard entry is enabled! abort..

It randomly stopped working after a reboot yesterday and I couldn't get it to run since then. I've tried rebooting, reinstalling, reinstalling with --HEAD and turning accessibility access off and on, to no avail.

Emit keypresses

It would be nice if skhd could emit keypresses like khd. I know skhd is supposed to be the lightweight version, but at least for me this ability is invaluable.

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.