2

My S key no longer rolls over with a number of seemingly random keys (Numbers work except for 5 and 6, most of the QWERTY keys work except for a, d, k and a few others).

It's a no-name Lenovo Black Silk USB keyboard, at least 5 years old.

This is rather frustrating because I use WASD layout and this didn't happen in the past. No other key is showing this problem.

Is this just the natural course of my keyboard degrading with age? Or is there any plausible way this was caused on the software side and is still salvageable?

  • 1
    Make, model, and age of the keyboard will help. However, with the other keys not working too it sounds like the keyboard should be replaced. – Sorean May 18 at 15:27
  • It's a no-name Lenovo Black Silk USB keyboard, at least 5 years old. Yeah, that's what I was fearing. Would still be cool to know whether there are any software processes that can interfere with key rollover though, even though it's likely not the case here. – Sunny May 18 at 15:38
  • Looks like it's a generic keyboard. Most of the time unless there has been software installed and/or macros created that accidently ignore rollovers, it's just a case of the keyboard dying. Or it could also be a poorly insulated USB port causing the problem too. – Sorean May 18 at 17:08
  • 2
    Does this happen with every game? – Wrigglenite May 18 at 18:15
  • If you press SA at the same time are both recognized? If you press ASD at the same time what happens? – user136727 May 20 at 15:39
2

Why This Happens

A Basic Switch

All keys on a keyboard are just a switch. When you press the button it connects two wires allowing any current to pass through them.

Unpressed   Pressed

│           ┃       
╎           ┃       
┗━━         ┗━━     

The bolded wires have current going through them. Where is to show an unpressed switch.

With this we can have a device that produces current on one end, and a device that reads current on the other to read if a switch is pressed.

Matrix

However having 100-110 readers and writers can get expensive when making a keyboard. And so it is common for producers to use a matrix. With the matrix you only need 11 readers and writers; a tenth of the amount you would otherwise need.

The matrix works by only sending power down one row at a time, and reading which of the columns gets a current. Due to this we can see that "no keys", "one key" and "two keys" all work perfectly.

No Keys     One Key     Two Keys    Ghostable   Ghosting    

 │   │       ┃   │       ┃   ┃       ┃   │       ┃   ┃      
┌┴┐ ┌┴┐     ┏┻┓ ┌┴┐     ┏┻┓ ┏┻┓     ┏┻┓ ┌┴┐     ┏┻┓ ┏┻┓     
╎ │ ╎ │     ┃ ┃ ╎ │     ┃ ┃ ┃ ┃     ┃ ┃ ╎ │     ┃ ┃ ┃ ┃     
┗━━━┻━━━━   ┗━━━┻━━━━   ┗━━━┻━━━━   ┗━━━┻━━━━   ┗━━━┻━━━━   
  ╎   ╎       ╎   ╎       ╎   ╎       ┃   ╎       ┃   ╎     
  └───┴──     └───┴──     └───┴──     ┗━━━┻━━     ┗━━━┻━━   

 │   │       │   │       │   │       ┃   │       ┃   ┃      
┌┴┐ ┌┴┐     ┌┴┐ ┌┴┐     ┌┴┐ ┌┴┐     ┏┻┓ ┌┴┐     ┏┻┓ ┏┻┓     
╎ │ ╎ │     │ │ ╎ │     │ │ │ │     ┃ ┃ ╎ │     ┃ ┃ ┃ ┃     
└───┴────   └───┴────   └───┴────   ┗━━━┻━━━━   ┗━━━┻━━━━   
  ╎   ╎       ╎   ╎       ╎   ╎       ┃   ╎       ┃   ╎     
  ┗━━━┻━━     ┗━━━┻━━     ┗━━━┻━━     ┗━━━┻━━     ┗━━━┻━━   
  • No Keys: Since none of the keys are pressed no current gets to the readers. This means the keyboard correctly reads no keys as being pressed.

  • One Key: Since the top left key is being pressed when current is passed to the top row we get a current on the left column. However when the current is in the bottom row we don't get a current in the left column, as the bottom left key is not pressed.

  • Two Keys: Since both the top left and right button are being pressed, both the left and right column have current when there is current in the top row. Again since the bottom keys are not being pressed, when there is current in the bottom row there is no current in the columns.

  • Ghostable: Much like "two keys" this works as expected. Only the left top and bottom buttons are recognized.

Ghosting

  • Ghostable: Because a switch is not directional when two switches are pressed that are on different rows but the same column the current gets passed to a row it shouldn't be in.

  • Ghosting: Expanding from "ghostable" where we have current in both rows, as we are pressing two keys in the same column. From here we can see since all rows have current and at least one of the left and right keys are pressed; the keyboard thinks that all the keys are being pressed.

Anti-ghosting Methods

Diodes

These force current to go one direction. This means if you attach one next to each switch then the current can't loop back round like in "ghostable" which prevents ghosting.

These are expensive and when put in a low end keyboard they can double or triple its price. Effectively forcing the keyboard to compete in the mid-range market.

Intelligent Wiring

When designing the keyboard manufactures may arrange the rows and columns to allow high key roll over for common combinations of letters. A 'gaming keyboard', for instance, could have WASD all on one row to prevent ghosting.

This is can be targeted to the keyboard layout (qwerty, dvorak, azerty) and so changing from the expected can cause there to be more ghosting then you would otherwise have.

Jamming

When the microcontroller encounters ghosting it can decide which of the keys to send to the computer. For example when typing "the" you could encounter ghosting, say "thge". The keyboard could jam the "g" from being sent.

Whilst clearly good for "thge" it can cause problems if used elsewhere. For example if "wasd" are the four letters on my 2x2 matrix above. If I am moving forward and left, but want to move forward and right instead; if I press right without letting go of left and all four button are sent to the microcontroller, what should the keyboard output?

Fixing Your Issue

Your Issue

To me it seems like there are two problems here. There is a problem with your matrix as you probably have wires connected somewhere they should not be. I would presume this is due to having some liquid in your keyboard. Additionally due to your keyboard being a "no name keyboard" we can see that your keyboard utilizes jamming as one of its anti-ghosting mechanisms. As we can see when ghosting happens (due to the faulty matrix) that keys are just wiped.

  • Is this just the natural course of my keyboard degrading with age?

    It can be, and it also can not be.

  • Or is there any plausible way this was caused on the software side and is still salvageable?

    Software to fix this is unlikely, does your driver allow you to change the settings of the keyboard to allow you to disable jamming? Otherwise unless you hack the micocontroller inside the keyboard it's a clear no.

    The keys are being discarded from inside the keyboard. There is no way for your computer to know about the keys.

Upgrade

You bought a keyboard that lasted 5 years. It probably wasn't expensive as it's a "no-name keyboard". That's pretty good price to performance. Just get an el-cheapo keyboard and you're set for another 5 years.

Debug Your Keyboard

You can use a site like keyboardchecker to help test your keyboard and find the source of the problem.

  1. Check all your keys work correctly on their own.
  2. Clean your keyboard, there may be conductive practicals in your keyboard.
    I.e. Did you spill anything on your keyboard? Did you slurp some noodles and some liquid went flying off your noodle straight over two bare wires?
  3. Disassemble your keyboard and check for problems in your wiring. Does anything look corroded away or like it's otherwise not in good shape?
  4. Seriously think about buying a new keyboard.
    I was going to find my spare keyboard's matrix but, boy, it's long and boring. It will tell you roughly where the problem is, but it's not guaranteed you'll be able to fix the problem.
  5. Determine the cause of the problem.

    As we should know you should never run into ghosting when you press two keys. Since you are running into this issue there is likely a connection between two wires which shouldn't be connected.

    From here you'll have to reverse engineer the matrix. So here's an example keyboard to help do this.

     │   │   │   │   │   │   │   │      
    ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐     
    ╎1│ ╎2│ ╎3│ ╎4│ ╎5│ ╎6│ ╎7│ ╎8│     
    └───┴───┴───┴───┴───┴───┴───┴───────
     ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐    
     ╎a│ ╎b│ ╎c│ ╎d│ ╎e│ ╎f│ ╎g│ ╎h│    
     └───┴───┴───┴───┴───┴───┴───┴──────
      ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐ ┌┴┐   
      ╎A│ ╎B│ ╎C│ ╎D│ ╎E│ ╎F│ ╎G│ ╎H│   
      └───┴───┴───┴───┴───┴───┴───┴─────
    

    To do so I would:

    1. Press three buttons until ghosting occurs.

      You now know those three buttons can be any of 1, 2, a or b.

    2. Hold down two of the three buttons. Press every other button. If two other buttons ghost then swap one of the buttons and start over.

      We now know the keys for 1, 2, a and b. The two keys we held down are 1 and b. Where the keys we didn't hold down are 2 and a.

    3. Holding down 1 and a, or 2 and b; press every other key on the keyboard to find 3-8 and c-h.

    4. We now need to pair up these keys.

      1. Pick one of the keys this is either 3 or c. Hold down this key and 1 and press every other key we found in ③. The key that ghosts is its pair.
      2. Repeat step ② but with 1 and, 3 or c.

      We repeat this until we have found the position of all of 4-8 and d-h.

    5. We do the same as ③ and ④ but holding down 1 and 2, 3 and 4, 5 and 6, and 7 and 8.

      Rather than holding down 1 and a, or 2 and b we now hold 1 and 2, ... until all columns have been completed and the matrix found.

    6. Alternate: Once you have found 1-8, a-h, A and B you can search by quad values as you know the rows and columns. For example using the top two in the 2 quad and the left two in the 6 quad we can find the values in the 7 quad.

      11 22334455
      11 22334455
      
      66 77889900
      66 77889900
      aa bbccddee
      aa bbccddee
      ff gghhiijj
      ff gghhiijj
      kk llmmnnoo
      
    7. You can now determine what is broken in your keyboard. I can't help with that but understanding the matrix should help you find it. Once you have found the problem, you can disassemble your keyboard and attempt to fix it.

      Worst case the keyboard was broken already. 🤷

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.