Code Monkey home page Code Monkey logo

Comments (2)

joshgoebel avatar joshgoebel commented on June 9, 2024 1

Closing this as about as fixed as we can get (for now) short of #31 which can carry on the torch of this issue.

from keyszer.

joshgoebel avatar joshgoebel commented on June 9, 2024

CC @RedBearAK @rbreaves Thoughts?

I'm thinking we may need to suck it up and allow users the choice here... although perhaps Kinto will choose for users? I see two tuning knobs and two main configs:

Eliminate all false-combos, but doesn't support trackpads and Cmd-click (without waiting a second to click)

Mice can be run thru keyszer to support instant cmd-click, but with the caveat that they may need to be configured twice (accel, libinput settings, etc)...

multipurpose_timeout(1)
suspend_timeout(1)
  • Multipurpose timeout being how long we wait to decide what to do with a multi-purpose key the user is not releasing.
  • Suspend timeout being how long we "hold in reserve" modifiers the user is pressing, before sending them to output without any keymap translation. If the user completes combos within this window we can avoid sending any false-combos at all.

False combos are allowed, and Cmd-click should "just work'

multipurpose_timeout(1)
suspend_timeout(0.1) # close to zero

This is more like the behavior of 0.4.0... where keys go to output as soon as they are pressed but then when a combo is trigger we pull those keys off of the output and exert the correct keys... only to reexert the original keys afterwards (which never was great behavior). I do think perhaps a 3rd delay could be added here:

post_combo_timeout(1)

It seems rare/weird to me that someone might run a combo then (while still holding keys) start mouse clicking with modifiers (though perhaps I'm wrong)... so perhaps we could get away with a longer timeout after combos are fired. How this would work:

  • User goes to type Cmd-Alt-E which is a shortut for Ctrl-Y
  • They hit Cmd (and it's sent to output)
  • They hit Alt (and it's sent to output)
  • They hit E and we realize it's a combo
  • We lift Cmd and Alt from the output.
  • We send the Ctrl-Y combo to the output.

Now it's LIKELY the user is (soon) going to release all the keys... so if we added a post-combo timeout instead of reexerting them on the output immediately we'd hold them in reserve... and if they are released - they never get sent to the output a second time... if they keep being held then soon we can re-exert them on the output.

This could probably be even shorter with good results (0.25, 0.33 seconds?) This is the question #31 is asking.

from keyszer.

Related Issues (20)

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.