Giter Club home page Giter Club logo

whkd's Introduction

whkd

whkd is a simple hotkey daemon for Windows that reacts to input events by executing commands.

Its configuration file (whkdrc) is a series of bindings which define the associations between the input events and the commands. By default, this file should be located in ~/.config/, or an alternative can be set using the environment variable WHKD_CONFIG_HOME.

If you are compiling from the master branch, a --config flag is also available, which, when used, overrides the WHKD_CONFIG_HOME environment variable. This flag will be made available in v0.1.3+.

The format of the configuration file (and this project itself) is heavily inspired by skhd and sxhkd.

Example

.shell pwsh # can be one of cmd | pwsh | powershell

# Specify different behaviour depending on the app
alt + n [
    # ProcessName as shown by `Get-Process`
    Firefox       : echo "hello firefox"
    
    # Spaces are fine, no quotes required
    Google Chrome : echo "hello chrome"
]

# reload configuration
alt + o : taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden

# app shortcuts
alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }

# focus windows with komorebi
alt + h : komorebic focus left
alt + j : komorebic focus down
alt + k : komorebic focus up
alt + l : komorebic focus right

whkd's People

Contributors

alexgirarddev avatar ashthespy avatar dependabot[bot] avatar lgug2z avatar vedantmgoyal9 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

whkd's Issues

[FEAT]: Allow setting config path

Is your feature request related to a problem? Please describe.
I prefer to keep application specific configuration in ~/.config/<tool>, making it easier to sync dotfiles across computers..

Describe the solution you'd like
Would be nice to have CONFIG_HOME variable similar to KOMOREBI_CONFIG_HOME to point to the location of whkdrc

Would be happy to add a PR if you are open to the idea :-)

custom location for whkdrc file

Describe the bug
Why can't i use the whkdrc file in a custom location? Please see below.

To Reproduce
Steps to reproduce the behavior:

PS C:\Users\azin> $Env:WHKD_CONFIG_HOME
C:\Users\azin\.config\whkd
PS C:\Users\azin> ls C:\Users\azin\.config\whkd\

    Directory: C:\Users\azin\.config\whkd

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---            5/9/2023  1:47 PM           2645 whkdrc

PS C:\Users\azin> whkd
No whkdrc file detected. Please place a configuration file at ~/.config/whkdrc and try again.
PS C:\Users\azin>

Operating System
Win 11 Pro

[FEAT]: Supports mode or layout

Is your feature request related to a problem? Please describe.
Just likes vim mode, you can switch to another to let the keybindings does other things. Or a switch key to active other keybindings layout. Even simply, a leader key with timeout.

Describe the solution you'd like
Maybe a switch key to active other layout is a good choice.

Describe alternatives you've considered
Vim mode.

Additional context
skhd supports to define a customize mode

VSCODE like keybinding

is there a way to make it like vscode where if i hold ctrl and first click k and then z to launch something or run a command .
is it possible in the current whkd
also really appreciate ur hard works and the software is awesome. Thank You🔥

[FEAT]: allow using non modifier keys as modifiers

Is your feature request related to a problem? Please describe.
currently when having ESCAPE + h : komorebic focus left in whkdrc, you get this error on startup:

Error:
   0: invalid key name `ESCAPE`

Location:
   src\main.rs:204

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Describe the solution you'd like
one should be able to use hotkeys such as ESCAPE + h, to leave the modifier hotkeys available for applications.

Describe alternatives you've considered
I have been trying to enable this with AHK for a long time but I couldn't, ahk scripting is really non-intuitive and confusing.

Additional context
I have the right alt key on my keyboard to the escape key using the registry remapping method, so to the OS it is an escape key not an alt key, this makes using vim more convenient since I can keep my right thumb always on this key. I would like to use this key also as if it is a "Pseudo-"modifier key, when it is pressed in combination with other keys, but it should not act as a modifier key when it is pressed and release by itself, it should press escape when it is released, and not the exact moment it is pressed down.

[BUG]: Cannot bind any shortcut

Description

My whkd config only has one keybinding configured:

.shell powershell

# Reload whkd configuration
ctrl + alt + o: taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden

Error:

Unable to bind '[Ctrl, Alt] + O' to 'taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden' (error: Hotkey registration failed. Hotkey or Id might be in use already), ignoring this binding and continuing...

But I can't still have any hotkeys working.
I've used ctrl + alt + o because the default alt + o also results in the same error.
There were no apps opened other than Terminal and Notepad.

Could it be any conflict or special permission causing the issue?

Steps

  1. Go to follow quick start installation using scoop
  2. Run the start command komorebic start -c $Env:USERPROFILE\.config\komorebi.json --whkd
  3. Run whkd --help
  4. See the error

Information

Operating System

OS Name:    Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000

[BUG]: whkdrc hotkey daemon does not toggle `Alt + Shift` when setting `komorebic toggle-pause`

Describe the bug
I have default keymappings in VSCode that bind to Alt+Shift. I want whkdrc hotkey daemon to toggle Alt and Alt + Shift on and off.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '$HOME.config\whkdrc'

Expected behavior
Both Alt and Alt+Shift are toggled on and off

Operating System
OS Name: Microsoft Windows 11 Education
OS Version: 10.0.22621 N/A Build 22621

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\LGUG2Z

Looking for configuration files in C:\Users\LGUG2Z

No komorebi configuration found in C:\Users\LGUG2Z

If running 'komorebic start --await-configuration', you will manually have to call the following command to begin tiling: komorebic complete-configuration

Additional context
No AHK scripts or software running that handle any aspect of window management or manipulation

[BUG]: whkd cannot re-start

I tried to change config file ~/.config/whkdrc, but cannot re-start it any more after it is killed. I followed this command:

taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden

While I cannot see this process any more when I try to find it: tasklist | findstr whkd

To Reproduce
Steps to reproduce the behavior:

  1. taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden
  2. tasklist | findstr whkd
  3. wkhd is not in tasklist, no hotkey works

Expected behavior
The whkd process should be started and hotkeys work

Screenshots and Videos
Add screenshots and videos to help explain your problem.

Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management, manipulation or hotkey binding

[BUG]: Invalid key name 'RLT'

Describe the bug
When attempting to run whkd in PowerShell, it just doesn't work. If I run Start-Process whkd it technically goes through but I think it is just suppressing the error because whkd still does not work.

To Reproduce
I am not sure how to reproduce it, unfortunately. I logged in one day and everything was broken. There might be an issue with the fact that there are multiple users on the device?

Expected behavior
I expected it to start working.

Screenshots and Videos
image

Operating System

OS Name:                   Microsoft Windows 11 Home
OS Version:                10.0.22631 N/A Build 22631

[BUG]: Inconsistent Window Activation

Describe the bug
Sometimes, a window could not be opened using a hotkey. For example, using the hotkey alt + b to open Google Chrome sometimes works fine, but other times the Chrome window flashes on the taskbar but does not become active

To Reproduce
Steps to reproduce the behavior:

  1. Set up a hotkey to open Google Chrome using the following script:
alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }
  1. Press alt + b to open Chrome.
  2. Observe the behavior:
  • Sometimes, Chrome opens and becomes the active window.
  • Sometimes, the Chrome icon flashes on the taskbar, but the window does not become active.

Expected behavior
Pressing the hotkey alt + b should consistently open Google Chrome and make it the active window without just flashing on the taskbar.

Operating System

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22635 N/A Build 22635
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
BIOS Version:              LENOVO N3AET81W (1.46 ), 4/24/2024

Additional context
I am also using ExplorerPatcher to customize the Windows 11 taskbar and other elements. I am not sure if this might be causing the issue, but it could be related.

[FEAT]: list of key codes

Is your feature request related to a problem? Please describe.
It's unclear how to refer to non-alphanumeric keys.

Describe the solution you'd like
In the readme.md, add a few examples, e.g. how to refer to the windows key (win? meta? super?) and the control key (control? ctrl?), how to refer to the bracket keys, the semicolon, etc. Or just a link to a website that lists them.

[BUG]: Shortcuts does not work

Describe the bug
For some reason, shortcuts does not work. When I do some of the shortcuts, the console shows this error: An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full. (os error 10055)

To Reproduce
Steps to reproduce the behavior:

  1. Put whkdrc in the .config folder
  2. Launch whkd

Expected behavior
Shortcuts does work

Screenshots and Videos
image

Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22621 N/A Build 22621

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management, manipulation or hotkey binding

[BUG]: ALT + Q supposed to write "@" with the TR Keyboard

Describe the bug
First, thank you so much for your effort in this project with Komorebi.
My problem is with the Turkish keyboard, before running whkd I can make the "@" symbol by pressing ALT and Q letters together, but after running whkd I can't write that symbol anymore although I don't have this key combination at whkd config file, I believe it's interfering with another config but I don't from I can turn it off, could you please help.

To Reproduce
Steps to reproduce the behavior:

  1. Turn the keyboard language to the Turkish language.
  2. try to make the "@" by pressing the ALT key and Q together.
  3. Nothing is going to happen.

Expected behavior
A "@" symbol has to appear.

Operating System
OS Name: Microsoft Windows 11 Enterprise
OS Version: 10.0.22631 N/A Build 22631
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
BIOS Version: LENOVO R17ET41W (1.24 ), 22-Feb-24

[BUG]: whkd unable to bind

Describe the bug
whkd cannot bind the hotkeys

To Reproduce
Steps to reproduce the behavior:

  1. install komorebic normally via scoop on pwsh7
  2. follow the tutorial
  3. run komorebic quickstart
  4. run komorebic start --whkd
  5. komorebic starts but hotkeys don't work

Expected behavior
The hotkeys should work

Screenshots and Videos
image

Operating System
Provide the output of systeminfo | grep "^OS Name\|^OS Version"

OS Name:                   Microsoft Windows 11 Home
OS Version:                10.0.22631 N/A Build 22631

komorebic check Output
Provide the output of komorebic check

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\willi

Looking for configuration files in C:\Users\willi

Found komorebi.json; this file can be passed to the start command with the --config flag

Found C:\Users\willi\.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag

Additional context
I have touchcursor on, I'm using an alternative layout (Halmak), I have powertoys on, I've done some configurations via sharpkeys

[BUG]: WHKD_CONFIG_HOME - custom config dir not being respected?

Describe the bug
Appears to be ignoring or unable to interpret a path, when $Env:WHKD_CONFIG_HOME is set.

To Reproduce
A clean install of komorebi and whkd, which is being scripted as below in pwsh:

# Install
#########

# install setup:
$config_dir_komo = "${Env:XDG_CONFIG_HOME}\komorebi"
$config_dir_whkd = "${config_dir_komo}\whkd"
$add_to_profile = @"

###################
# Komorebi Config #
###################
`$Env:KOMOREBI_CONFIG_HOME = '${config_dir_komo}'
`$Env:WHKD_CONFIG_HOME = '${config_dir_whkd}'
"@ -split '\n'

# apply setup:
mkdir -p $config_dir_komo
mkdir -p $config_dir_whkd
Add-Content -Path $PROFILE $add_to_profile
. $PROFILE

# install komorebi:
winget install LGUG2Z.komorebi LGUG2Z.whkd

That script bolts the following to the end of $PROFILE and then dot sources $PROFILE before installing via winget:


###################
# Komorebi Config #
###################
$Env:KOMOREBI_CONFIG_HOME = 'D:\XDG\config\komorebi'
$Env:WHKD_CONFIG_HOME = 'D:\XDG\config\komorebi\whkd'

So all the paths are being interpreted correctly, and sourced into the shell correctly prior to the winget install commands. Output from querying those env vars in the shell prior to running winget:

(base) PS C:\Users\kiham> $Env:WHKD_CONFIG_HOME
D:\XDG\config\komorebi\whkd
(base) PS C:\Users\kiham> $Env:KOMOREBI_CONFIG_HOME
D:\XDG\config\komorebi

Expected behavior
At the end of that script, I expected to see whkdrc land in D:\XDG\config\komorebi\whkd (or at least: ~/.config/whkdrc).
It actually doesn't seem to be turning up anywhere at all?

Operating System

OS Name:                   Microsoft Windows 10

[FEAT]: Support `nushell`

Is your feature request related to a problem? Please describe.
I would like to use nushell along with whkd.

Describe the solution you'd like
Add nushell under supported terminals here:

pub enum Shell {

I can try to make a PR for this.

Describe alternatives you've considered
I have considered using PowerShell alongside nushell, but I had some trouble using both while keeping nushell as the "default". For now, I am going to disable nushell as the default shell (via COMSPEC).

Additional context
n/a

[BUG] WHKD doesn't start

Describe the bug
WHKD stops with an error during startup

Error:
   0: program not found

Location:
   src\main.rs:97

The code on line 97 seems to start a powershell but I don't see why that wouldn't work.

[FEAT]: Mouse Buttons?

Not sure if this is a feature request or a help request. Is it already possible to bind actions to mouse buttons. I saw reference in a komorebi issue to binding window resizing to alt+wheel, but I'm not sure if that's possible with whkd.

WHKD cannot bind keys

I installed yasb and when I tried to conenct it with komorebi, my keybindings stopped working. When I run whkd I am getting this
image
Any ideas on how to solve this issue?

[BUG]: Left Alt does not work for certain shortcut

Describe the bug
I have alt + 1,2,3 set up to switch to different workspaces in komorebi. Using 2 and 3 work fine, but alt + 1 doesn't work when using left alt, nor does alt + shift + 1 for moving windows to workspace 1.
Strangely, this is the only combo where left alt seems to not work. The other workspaces switches, and all my other shortcuts work fine from either alt.

To Reproduce
Steps to reproduce the behavior:

  1. Configure hotkeys:
# Workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2

# Move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2
  1. Try switching to workspace 0 with leftalt+1. Doesn't work. Try with right alt, works fine.

Expected behavior
Both alts work the same for shortcuts.

Screenshots and Videos
Add screenshots and videos to help explain your problem.

Operating System
Provide the output of systeminfo | grep "^OS Name\|^OS Version"

OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management, manipulation or hotkey binding

[BUG]: Cannot bind "win" key in whkdrc

I tried to bind the "win" key in ~/.config/whkdrc, I tried to change alt to win or super, but it does not work. How exactly can I change alt to win key in the config file?

To Reproduce
Steps to reproduce the behavior:

  1. change alt to win in whkdrc
  2. restart whkd
  3. see bug, win key bindings are not working

Expected behavior
win key should be able to be bound for shortcuts like AHK

Screenshots and Videos
Add screenshots and videos to help explain your problem.

Operating System
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22000 N/A Build 22000

Additional context
Add any other context about the problem here.

In particular, if you have any other AHK scripts or software running that handle any aspect of window management, manipulation or hotkey binding

WHKD Not Starting

Hello, trying to start WHKD after installing komorebi. I keep getting this error.

Fresh install on Windows 11:

PS C:\Users\mabri> whkd -h
Error:
   0: Hotkey registration failed. Hotkey or Id might be in use already

Location:
   src\main.rs:47

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

Config:

.shell powershell

# reload swhkd configuration
# alt + o                 : taskkill /f /im swhkd.exe && start /b swhkd # if shell is cmd
alt + o                 : taskkill /f /im swhkd.exe && Start-Process swhkd -WindowStyle hidden # if shell is pwsh / powershell
alt + shift + o         : komorebic reload-configuration

# app shortcuts - these require shell to be pwsh / powershell
# the apps will be focused if open, or launched if not open
# alt + f                 : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }
# alt + b                 : if ($wshell.AppActivate('Chrome') -eq $False) { start chrome }

# focus windows
alt + h                 : komorebic focus left
alt + j                 : komorebic focus down
alt + k                 : komorebic focus up
alt + l                 : komorebic focus right
alt + shift + oem_4     : komorebic cycle-focus previous # oem_4 is [
alt + shift + oem_6     : komorebic cycle-focus next # oem_6 is ]

# move windows
alt + shift + h         : komorebic move left
alt + shift + j         : komorebic move down
alt + shift + k         : komorebic move up
alt + shift + l         : komorebic move right
alt + shift + return    : komorebic promote

# stack windows
alt + left              : komorebic stack left
alt + down              : komorebic stack down
alt + up                : komorebic stack up
alt + right             : komorebic stack right
alt + oem_1             : komorebic unstack # oem_1 is ;
alt + oem_4             : komorebic cycle-stack previous # oem_4 is [
alt + oem_6             : komorebic cycle-stack next # oem_6 is ]

# resize
alt + oem_plus          : komorebic resize-axis horizontal increase
alt + oem_minus         : komorebic resize-axis horizontal decrease
alt + shift + oem_plus  : komorebic resize-axis vertical increase
alt + shift + oem_minus : komorebic resize-axis vertical decrease
 
# manipulate windows
alt + t                 : komorebic toggle-float
alt + shift + f         : komorebic toggle-monocle

# window manager options
alt + shift + r         : komorebic retile
alt + p                 : komorebic toggle-pause
alt + 0                 : komorebic toggle-focus-follows-mouse

# layouts
alt + x                 : komorebic flip-layout horizontal
alt + y                 : komorebic flip-layout vertical

# workspaces
alt + 1                 : komorebic focus-workspace 0
alt + 2                 : komorebic focus-workspace 1
alt + 3                 : komorebic focus-workspace 2

# move windows across workspaces
alt + shift + 1         : komorebic move-to-workspace 0
alt + shift + 2         : komorebic move-to-workspace 1
alt + shift + 3         : komorebic move-to-workspace 2

[BUG]: whkd not working correctly with Powershell 7.4.1

Describe the bug
If I try to run whkd with PowerShell 7.4.1, I only see the commands printed to the terminal instead of execution of the commands.

To Reproduce

  1. Set whkdrc shell to: .shell pwsh
  2. komorebic start --whkd
  3. Press alt + left
  4. komorebic focus left is printed to the terminal but the focus doesn't change
  5. The same happens with any other mapped hotkey

I am using the example whkdrc from Github

Expected behavior
I expected the focused window to change

Operating System
OS Name: Microsoft Windows 10 Enterprise
OS Version: 10.0.19045 N/A Build 19045

komorebi 0.1.22
whkd 0.2.0


**Additional context**
If I change whkdrc to 
.shell cmd 

and I start komorebic and whkd from the command prompt, everything works as expected.

[FEAT]: Mapping key sequences

Is your feature request related to a problem? Please describe.
Hotkeys sequences, similar to how vim keymaps work (e.g. vip for select v in paragraph ip), would be a nice way to have consistent behavior and reduce the necessary hotkey domain space which needs to be mapped (and might therefore interact poorly with application-specific hotkeys).

Describe the solution you'd like
An example would be a configuration line like the following:

alt + super, alt + h : komorebic focus left

Which I would want to allow me to hit Alt+Super, then hit Alt+h to focus left. This helps mask the Alt+h keybinding to a specific context and makes it less likely to interfere with an application map. This feature would probably need a configurable time out parameter as well.

Overall the value of this feature depends on how many keymap-intensive applications a specific user has and the extent to which they require more maps to fiddle with window layouts in more complex ways vs. just choosing a main window and tossing the rest in a stack to the side.

Describe alternatives you've considered
(caveat: I just found out about this project, so my understanding may be limited. Please excuse any ignorance)

This might already be possible by manually managing state within the config file. I noticed that there is conditional logic in the example in the README, so a persistent value store and timestamp mechanisms could allow for this type of thing to be managed by the user, as opposed to implementing parser support and logic for this feature directly in whkd. The other thing a user would need to figure out how to do this would be a "passthrough" mechanism so that the hotkey can bubble into the application instead of just being trapped by whkd (if indeed whkd does any kind of trapping). I'm not sure if these things (persistent value store, programmatic calls to get time, passthrough) are already available or not and I am extremely new to cmd/PowerShell specifically in comparison to linux CLI tools.

Additional context
Not really sure if this fits with the project vision, and a wontdo close would be totally appropriate. Just found out about this project and komorebi and it looks very interesting. Thank you for making it available!

[FEAT]: Shorthand values for mod combinations

When writing a configuration with a lot of bindings involving modifier combinations, IE: "ctrl + shift +", it gets repetitive having to type in the same list of modifiers for each binding. It would be helpful if there were special case values that one could use as a short hand, such as:

cs
as
ca
cas (meh in QMK)
caws (hypr in QMK)

This would make configs a lot easier to parse at a glance, at least for me. Planning on using meh as a workaround for the Win key system shortcut issue in windows, and would save me a fair bit of repetition in getting all of that configured.

[BUG]: Terminate active window with hotkey

Describe the bug
I can't seem to figure out a way to kill currently active and selected process with a hotkey in the whkdrc.
I'm not sure if this is my lack of powershell knowledge or a Windows limitation

Expected behavior
To close the currently active window.

Operating System

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.19045 N/A Build 19045

[FEAT]: blacklist a specific process

Is your feature request related to a problem? Please describe.
I am using PyCharm (Jetbrain's Python IDE) for developing and using many shortcuts with it. Some hotkeys for whkd overlap, so I want to register it on the blacklist for whkd.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
Just passthrough specific key combinations directly to PyCharm instead of being hooked by whkd? I mean, for some hotkey-wisely passthrough keys to the pycharm64.exe process?

[FEAT]: Allow hotkeys without modifiers

Is your feature request related to a problem? Please describe.
I use whkd for komorebi hotkeys. I own multiple keyboards with different layouts as well as hardware layer support, and I'd like to be able to use unused keycodes like F13-F24 on a separate layer in order to 1) free up some <Alt + basic key> combinations and 2) keep certain hotkeys as layout-agnostic as possible.

However, whkd doesn't seem to allow hotkeys without alt/ctrl/shift modifiers. The problem is that the layer switch is in itself already a modifier and takes up a keypress, and requiring a second modifier is redundant.

Describe the solution you'd like
Allow hotkeys without modifiers, even at least for unused keycodes.

Describe alternatives you've considered
At the moment, each key in my hotkey layer is mapped to <Alt + (F13-F24)>. While technically, it works for whkd and komorebi, I could have had more key combinations available for other applications and hotkeys if the keys weren't already modified with Alt by default.

[BUG]: whkd crashes with only one hotkey

Describe the bug
If the whkdrc config file ends in a single hotkey whdk crashes with the following error message:

The application panicked (crashed).
Message:  could not load whkdrc:
   0: could not parse whkdrc: [Simple { span: 97..97, reason: Unexpected, expected: {Some('\n'), Some('#'), Some('\r')}, found: None, label: None }]

Location:
   src\whkdrc.rs:52

If there's a newline or a comment after the shortcut, no error occurs.

To Reproduce
Steps to reproduce the behavior:

  1. Use the following whkdrc config:
.shell pwsh # can be one of cmd | pwsh | powershell

alt + h : echo "Hello"
  1. Run whkd. The program will show an error.

Any of the following configs will not throw an error:

.shell pwsh # can be one of cmd | pwsh | powershell

alt + h : "Hello"

.shell pwsh # can be one of cmd | pwsh | powershell

alt + h : "Hello"
#I'm a comment
.shell pwsh # can be one of cmd | pwsh | powershell

alt + h : "Hello"
alt + h : "Hello"

Expected behavior
The program should not crash if it ends in a single shortcut.

Operating System

OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.19045 N/A Build 19045

[FEAT]: Auto-repeat hotkey on hold

Is your feature request related to a problem? Please describe.
I can't hold down alt + oem_plus and alt + oem_minus to resize windows in whkd like I can in AHK.

Describe the solution you'd like
whkd should auto-repeat hotkey on hold, similar to AHK behavior.

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.