• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    1 hour ago

    The connection column indicates the connection used. USB FS stands for the usb full speed protocol, which allows up to 1000Hz polling, a feature commonly advertised by high-end keyboards. USB is the usb low speed protocol, which is the protocol most keyboards use.

    USB Low Speed allows 1kHz polling too. I don’t think you gain anything at all from High Speed. Keyboards probably only use it incidentally because the chip they are using happens to support it anyway.

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 hours ago

    When I was researching keyboards recently, I stumbled over a pro gamer (I believe) YouTuber who was quite vocal about pretty much all gear marketed as “gaming gear” is overpriced marketing bullshit. Apparently, they tested dozens of keyboards, mice, and headsets over the years. It certainly matched my impression of reading tests about products previously.

    “Gamer” chairs are racecar chairs meant to keep you from sliding sideways, not being fit for long sitting sessions on a PC. Prefer a good or decent office chair. “Gamer” headsets are worse and more expensive than other headsets. Keyboards and mice are mostly marketing. etc.

    Regarding input, they made a point about physical human limitations and state like sleep and caffeine intake having much more of an effect than the hardware you use.

    2022 update

    So this article is quite old. There are keyboard switches now that activate as soon as you activate the key, and that can recognize lift and press without passing a trigger point. If you want that kind of edge, those are the top performers right now. I’d be more interested in the technology and maybe playful capabilities than the performance they add.

    I’m always way too thorough when researching products before buying…

  • naeap@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 hours ago

    Can someone enlighten me, how to debounce without causing latency?

    In the article, he only says “Now, how to debounce without adding latency has become common knowledge”, and I have absolutely no clue how that should work

    Edit: seems they just wait for the signal edge and ignore any signal “jumping” for some time afterwards
    Probably works ok/good with keyboards, but not with every application of debouncing

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    9 hours ago

    That’s…actually a substantial amount more latency than I’d expected. Not exactly the same thing, but for perspective, while I haven’t played multiplayer competitive FPSes for many years, back when I did, the limit of what I could really “feel” when it came to network latency was around 10 milliseconds. The latency the keyboards are adding, if it’s as high as measured, is a really substantial amount of delay to be adding if you’re talking video games.

    considers

    Note that depending upon the keyswitch mechanism, the controller does need to debounce the thing to avoid duplicate keypresses. I’ve used a keyboard before with a controller that didn’t adequately debounce, and it was extremely obnoxious — occasionally would get duplicate keypresses, and I had to filter it out at the level of my computer.

    However, if you look at gamepad button latency, they also need to worry about bounce, and their latency is much lower:

    https://gamepadla.com/

    You can get gamepads with sub-2-millisecond latency on USB.

    EDIT: Note that one thing that I learned from following !ergomechkeyboards@lemmy.world is that there are some semi-standardized open-source firmwares for (fancy, expensive) microcontroller-based keyboards; I believe that QMK is popular. I don’t know how the latency on those microcontroller-based keyboards compare, but assuming that there aren’t any fundamental constraints imposed by the other hardware on the keyboard, it might be possible to shave some time off of that by tweaking the firmware.

    I believe that at least some keyswitch mechanisms become more prone to bouncing over time, but if so, it might be possible for a microcontroller to detect bounces and tune the wait time to the mechanism on a given keyboard to adapt to mechanism wear.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      4
      ·
      10 hours ago

      Yeah, so many people swear by mechanical keyboards with a huge amount of key travel, and I never see it discussed that the key travel itself is problematic.

      • Glitchvid@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        8 hours ago

        This has been an extolled benefit of the new Hall/TMR design keyboard/switches.

        Because they deal with a continuous activation level, you can define in software when the “press down” signal gets fired in the key travel, including immediately stopping the press once it stops traveling down, and resuming it in the reverse; effectively eliminating pre-travel.

        These boards apparently started getting banned in comp play even, from what I’ve heard. Caveat emptor, I’m not into the comp gaming scene.

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 hours ago

    Another thing to note about gaming keyboards is that they often advertise “n-key rollover” (the ability to have n simulataneous keys pressed at once — for many key combinations, typical keyboards will often only let you press two keys at once, excluding modifier keys). Although not generally tested here, I tried a “Razer DeathStalker Expert Gaming Keyboard” that advertises “Anti-ghosting capability for up to 10 simultaneous key presses”. The Razer gaming keyboard did not have this capability in a useful manner and many combinations of three keys didn’t work. Their advertising claim could, I suppose, technically true in that 3 in some cases could be “up to 10”, but like gaming keyboards claiming to have lower latency due to 1000 Hz polling, the claim is highly misleading at best.

    That being said, the real issue was keyboards that used matrix encoders, where all keys were represented in a matrix, addressed by one line going high on the X axis and one line going high on the Y axis. I understand that this is cheaper, and expect that it’s probably because this requires running fewer traces from the keys to the controller than doing one for each. It looks Something like:

    - X1 X2 X3
    Y1 “Q” “W” “E”
    Y2 “R” “T” “Y”
    Y3 “U” “I” “O”

    That’s just a 3x3 matrix, as an example. So if I press “Q” on my keyboard, the X1 and Y1 line will go high. If I keep it pressed and then additionally press the “W” key, the Y1 line, which is already high, will stay high. The X2 line will then also go high. The controller can detect the keypress, since a new line has gone high.

    If I keep both keys pressed and then additionally press the “R” key, then the X1 line is already high due to the “Q” key being down, and will stay high. The “Y2” line will go high. The controller can detect the keypress.

    However, if I then press the “T” key, it can’t be detected. Pressing it would normally send the X2 line and Y2 line high, but both are already high due to existing keys being pressed.

    In practice, keyboard manufacturers try to lay out their matrix to try to minimize these collisions, but there’s only so much they can do with a matrix encoder. They’ll also normally run independent lines for modifier keys.

    A controller using a matrix encoding can always detect at least two keys being simultaneously pressed, but may not be able to detect a third.

    Matrix encoders aren’t really an issue when typing, but some games do require you to press more than two non-modifier keys at once. For example, it’s common to use the “WASD” keys for movement, and moving diagonal requires holding two of those. if someone is playing a game that requires pressing another key or two at once, those might collide.

    As I recall, USB sends the full state of the keyboard, not events specific to a button when a button is pressed. There are protocol-level restrictions on the number of “pressed keys” that can be pushed. That means that USB keyboards don’t support n-key rollover, and are why you’ll see some companies selling gaming keyboards with a PS/2 option — because that protocol does send state on a per-button basis. (It’s also why, for those of us that have used PS/2 keyboards and have experienced this, it’s possible to get a key on a PS/2 keyboard “stuck” down until it’s pressed again if the OS, for whatever reason, misses a key-up event.) USB gaming keyboards probably (hopefully) won’t actually advertise n-key rollover. But they can avoid using a matrix encoder, and in general, one really doesn’t need n-key rollover for playing games — just the ability to detect up to the USB limit. We only have ten fingers, and I don’t think that there are any games that require even something like six keys to be down at once.

    Obviously, in the case the author hit with the Razer keyboard, it wasn’t able to do that. I’m not sure what they’re doing (unless they’re simply completely fabricating their feature claim, which I assume that they wouldn’t). They might be using a larger matrix and sparsely-populating it, though I’m guessing there.

    • HakFoo@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      ·
      8 hours ago

      The “default” mode for a USB keyboard allows submitting 6 keys + modifiers. Some boards define nontraditional input descriptors that allow more, but that mode is not guaranteed to work in places like the BIOS menu or naive KVM switches.

      To avoid phantom keypresses when you hit three keys in a “square” on the matrix, a diode can be placed in series with each switch so current can’t go through an “indirect” route.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    10 hours ago

    A major source of latency is key travel time. It’s not a coincidence that the quickest keyboard measured also has the shortest key travel distance by a large margin.

    Hah, slim keyboars for the win.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    9 hours ago

    They notice 50 ms vs. 200 ms? Back then in Windows 7, there was a registry hack to chabnge the autohide animation duration of the taskbar. 400 ms was default, 300 ms fast and 200 ms was snappy. This was a lession to me, that interaction/interface stuff plays in the 100 ms at most.

    Edit: guess it’s different in input vs. animation.

    • HaraldvonBlauzahn@feddit.orgOP
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      7 hours ago

      50 ms is clearly noticeable. Dan Luu mentions 2ms in the original post.

      Try in a terminal

      read a; sleep 0.02; echo $a
      

      and vary the number.

      Actually, the time resolution for visual sensations is at least 5ms and for sound it is even smaller - a drummer in s band needs to practice a lot to get the right beat.

    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 hours ago

      You can definitely feel 100 ms in input response time. That’s about what an analog modem’s latency would be. I can tell you, that’s very much noticeable on a telnet or ssh connection when you’re typing (though to be fair, what matters there is really round-trip time, so one should probably double that).

      On that note, if someone hasn’t run into it, mosh uses UDP and adaptive local echo to shave down network latency for terminal connections, and might be worth looking into if you often do remote work in a terminal over a WAN. It uses ssh to bootstrap auth (if you’re concerned about using less-widely-used thing what does network authentication, which I remember I was). I find that it makes things more pleasant, and also like some of its other features, like auto-reconnecting after an arbitrary length of time. One can just close a laptop and then reopen it a week later and the terminals function. Tmux and GNU screen can also do something similar — and in fact, I think that mosh and tmux are good packages to pair with each other — but they don’t do quite the same thing, as they require (a) manual re-establishment of connection and are (b) aimed at letting one reconnect from different clients. It also displays a notice in the terminal if there’s temporary network unavailability until it’s re-established communication, so the user isn’t simply staring at his screen wondering whether the software on the remote machine is being unresponsive or whether it’s a network issue.