-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Double tap & interrupt questions #411
Comments
You can just delete the first character on the second tap. |
I have experimented with that, but that looks terrible on the screen, and does not work when I want to use it for a chord or as a key sequence. For example, So deleting works for some cases, but for a number of things I'd want this for, it doesn't :( |
This is the same sort of problem that I've encountered with implementing double taps on touchscreens, and I would imagine an implementation here would have similar frustrations - the time between taps is just too long, and makes regular input "laggy" to some degree. It's definitely possible to implement, and many mobile devices still do. If you're only wanting the double-tap feature on some keys, you can enter a double-tap mode, which would basically record keypresses for the delay time, then sort out what to do with them (in order) once it's been established that it's a single or double tap (or even triple/whatever). There will always be a delay when using that key/the keys after it, but I would imagine it'd be something you could deal with. That sort of input lag (everything still processed and in order) is something I know I've gotten used to when my computer is working overtime :) If you have a speaker on your keyboard, you could use that for quick feedback that you're double-tapping, so your know that your presses are being acknowledged. I would imagine feedback on the single tap would be a little more annoying, but maybe not! Something else to consider here is a dedicated leader-type key that can be tapped more than once before a sequences begins. There's no delay associated with that since it's a dedicated key. |
Ah, I gotcha. If you're interested in implementing the recording thing, check out the leader key implementation here. It basically does what you'd need to do to capture the keypresses, except that you'd need to capture keyups as well, and store that information - the only other things you'd need to change are the conditionals that decide when things are recording, and the array's size. The final implementation would need to change as well - that could really be put anywhere, but probably makes the most sense as a macro like the |
Will have a look at that, when I have more than a few minutes of keyboard-hacking time, thanks! |
I don't believe that an entirely new feature has to be created. The current tapping code already has most of the pieces in place, and all that needs to be done is expand it. |
I think the best thing one can do with programmable keyboard is to place modifiers on home row; full set (alt, ctrl, shift, meta) on each side. This makes each shortcut accessible instantly. This single modification had the biggest impact on comfort in my case. Have you tried this? |
@piotr-dobrogost I wholeheartedly agree. Modifiers on both sides are a must. |
@piotr-dobrogost do you have your keymap up here anywhere? |
I tried that, and hated it. I could only put them under my pinky, and that wasn't good - it's ok on something small like the TypeMatrix I used before, but on an ErgoDox, that stretch is not comfortable for me. Besides, I'd rather have the modifiers on one thumb cluster ( This works for me, I did pretty extensive tests to see what layout works best, and this layout of modifiers is what I'm sticking with. As for the feature - I have not looked at the leader key code at all yet. If it can be extended, instead of a whole new feature built, rest assured I will extend. I'm a lazy person, not going to do needless work if I can avoid it :) |
I'm confused. One types on home row keys using all fingers but thumbs. Why pinky only, what stretch do you have in mind? Could you elaborate?
I have pinky -> meta, ring -> shift, middle -> ctrl and index -> alt on both sides. You can avoid pinky by using some key outside of home row but within comfortable reach (like "e" or "i") – see the strain map at http://www.workmanlayout.com/blog/#design.
Placing modifiers on thumb clusters generally do not work as you can't press combos easily then. Besides thumb clusters on ErgoDox are so bad…
Well, I guess this is rather uncommon and surely leads to rather unique layout.
How is this even possible? Not yet :) |
On my ErgoDox, I can reasonably put modifiers to the following places:
I went with the thumb cluster, because all of my modifiers are one-shot, I never hold them. So I just smash them with my left thumb, and the next key is pressed by whatever finger is needed for it. This puts some good work on the thumbs, my strongest fingers. See the picture above, with my layout.
This assumes a traditional keyboard - my TypeMatrix is like that, and I have no problem reaching the sides with my pinky, the keyboard is compact. With the ErgoDox, it's different.
As I said, I do not press combos. I have one-shot modifiers, I tap them, and press another key. This makes it very convenient to have them on the thumb cluster, no finger-jamming or twisted finger positions involved. I find the thumb cluster reasonably ok - it could be better, but I can hit 3 keys easily, and that's enough to give my thumbs a reasonable amount of work, and I can use the rest for less used keys, because moving my hand to reach them is okay, once in a while. I only want to avoid hand movement when done regurarly.
Spacemacs & modal editing :) |
@algernon Just so we're clear, I'm talking about the code in |
@eltang Yup, got it. |
Turns out this was easier than I imagined. All I had to do was to have a custom code I can process with See here for the interesting bits of how it can be done. The way it works is as follows: I count the number of times the key was pressed, and don't do anything until either another key is pressed, or the timer fires (this latter I check in Thus, my immediate issue is fixed, this can be done on a per-keymap basis, and isn't terribly hard, either. As such, I am closing the issue. If I get around to implement this in a more generic way, I'll open a pull request. If you think this should be kept open nevertheless, please reopen it. Thanks for the help here, and in other issues like #303 where I borrowed the idea from! |
Awesome :) |
This is more of a question than an issue, if this is not the right place to ask these questions, please direct me to the right forum.
What I would like to achieve, is to have a number of double-use keys, that input one symbol when tapped once, and another when tapped twice. This works reasonably well when one of the keys is a modifier, but if I want one tap to be
:
, and double-tap to register?
, that's not really possible, not without ill side-effects.If I make an Fn key out of it, that calls
ACTION_MACRO_TAP()
, then when I tap the key once, we hit both the pressed and the released events, then when I tap it a second time, we hit them again. So to be able to register?
only, I need to postpone registering:
until the multi-tap is interrupted, or it times out. The timing out part is the easier case, but interruption does not work as I'd wish: if I tap:
anda
in quick succession,a
may come out first.What I'd want to do, is a simple way to say: I want
:
when tapped once, and only once. If I don't tap anything for the nextTAPPING_TERM
, register it. If I hit any other key, register:
first, before the other key. If I hit the key again, and double-tap it, give me an?
. Preferably, I'd do this without having to add tons of boilerplate.Is this reasonably possible right now? If so, what am I missing?
The text was updated successfully, but these errors were encountered: