Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple mod keys break command? #65

Closed
lilruffian opened this issue Aug 26, 2020 · 2 comments
Closed

Multiple mod keys break command? #65

lilruffian opened this issue Aug 26, 2020 · 2 comments

Comments

@lilruffian
Copy link

I'm sure this is just a problem on my end but I can't seem to sort it out.

Here's my code

;; Select all the way left ;; {:mods [:cmd :shift] :key :h :action (key-fn [:cmd :shift] :left) :repeat true}

If i change :mods [:cmd :shift] to mods [:ctrl] the shortcut works as expected. Am I using multiple mods incorrectly?

@jaidetree
Copy link
Collaborator

Here's my key-fn:

(fn keystroke
  [target-mods target-key]
  (hs.eventtap.keyStroke (or target-mods []) target-key 10000))

(fn key-fn
  [target-mods target-key]
  (fn [] (keystroke target-mods target-key)))

Here's what I added into my config.fnl in the common-keys map:

{:mods [:cmd :shift]
 :key :h
 :action (key-fn [:cmd :shift] :left)}

Seems to be working for me. The gif above shows me pressing cmd+shift left-arrow but I'm actually pressing cmd+shift h like your binding expresses. What's your key-fn implementation?

2020-08-26 23 12 24

@Grazfather
Copy link
Collaborator

Can't repro, and it's been a year. Please comment if you still have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants