Ctrl, shift and alt keys stopped working

848

Solution 1

Assuming that the problem is with software, try the following :

  1. Fully patch Windows using Windows Update, including optional items (except Bing etc.)
  2. Use sfc /scannow to verify system integrity
  3. In Control Panel -> Device Manager, open Keyboards, delete your keyboard device and reboot (might need to use the power button)
  4. In Control Panel -> Region and Language, in the Keyboards and Languages tab, click Change keyboards.. and verify that you are using the correct keyboard. (Have you got more than one?)
  5. Boot into Safe mode and check whether the problem disappears. If it does, then an installed product is causing the problem.
    Use the System Configuration utility, General tab, click Selective startup and clear the Load startup items check box. On the Services tab, click the Hide all Microsoft services check box and click Disable all. OK out and restart the computer.
    If the problem still does not occur, turn on Services back in binary search mode until you find the guilty one.

Solution 2

Sometimes the keyboard gets stuck. I found that rapidly pressing the shift, alt, and ctl keys will eventually unwedge them. Try about 6 or 7 good presses on each in rapid succession, eg shift shift shift shift shift alt alt alt alt

This is often enough to wake the keyboard to the proper state.

You might find another symtom is that you can't click mouse-button 1, you always get the context menu following the mouse around. This is a cure for that issue too.

Share:
848

Related videos on Youtube

niksmac
Author by

niksmac

Updated on September 18, 2022

Comments

  • niksmac
    niksmac over 1 year

    Here is what my controller looks like

    exports.pnumber = async(function* (req, res) {
      const user = new User()
      try {
        yield user.findOneAndUpdate(req.body.pnumber, req.body.uid)
        res.send('success')
      } catch (err) {
        console.log(err)
      }
    })
    

    and my modal is

      findByIdAndUpdate: function (pnumber, uid) {
        var query = {'_id': uid},
          update = {
            $push: {pnumbers: pnumber}
          },
          options = {upsert: true}
        return UserSchema.findOneAndUpdate(query, update, options)
      },
    

    and the schema definition is

    const UserSchema = new Schema({
      name: { type: String, default: '' },
      pnumbers: [],
      createdAt: { type: Date, default: Date.now }
    })
    

    The error I am getting is

    https://pastebin.com/ha65Jizm

    • Dave
      Dave over 11 years
      Can you clarify this means for everything or only with other keyboard presses. If you press alt on your browser, does it select the File menu? What happens if you press the left shift key 5 times quickly?
    • jsgroove
      jsgroove over 11 years
      Yes, this is for everything, not only key combinations. Pressing alt will not change focus to the top menu and repeatedly pressing the shift key will not bring up the sticky keys dialog.
    • Benjamin Gruenbaum
      Benjamin Gruenbaum over 6 years
      The fact it's an unhandled promise rejection doesn't change the error source: user is not defined - you didn't define a user variable.
    • niksmac
      niksmac over 6 years
      @BenjaminGruenbaum still getting the error even after I fixed, see my edit.
    • Benjamin Gruenbaum
      Benjamin Gruenbaum over 6 years
      There is no way you're getting that exact error with the above code, it's simply impossible. Copy the new error - and in the future please read error messages more carefully.
    • niksmac
      niksmac over 6 years
      @BenjaminGruenbaum yes you're right. I am trying different methods. now the error is pastebin.com/ha65Jizm
    • Benjamin Gruenbaum
      Benjamin Gruenbaum over 6 years
      In any case, the error is about your mongoose usage and doesn't have much to do with promises - you're passing data to mongoose incorrectly. The unhandledRejection is just an "uncaught error"
    • niksmac
      niksmac over 6 years
      Figured it out. Will be posting the answer now.
  • jsgroove
    jsgroove over 11 years
    I have previously verified the accessibility options and none of them is checked.
  • Dave
    Dave over 11 years
    Can you confirm that within device manager that the keyboard drivers are up to date.
  • jsgroove
    jsgroove over 11 years
    Yes, have also used the device manager to check for driver updates and the system said that the drivers are up to date.
  • jsgroove
    jsgroove over 11 years
    I have also did a system restore to 3 days ago but it did not fix the problem.
  • Dave
    Dave over 11 years
    Maybe the keyboard is on the way out - I would suggest you plug in a new one and see if this solves the problem. Then you may need to get the keyboard fixed or use an 'external' one
  • jsgroove
    jsgroove over 11 years
    I am thinking that it may be a problem with the OS, seeing as both the left and right keys stopped working, then the USB device not recognized message started to appear, and something is wrong with the sound as well, it's much lower and it doesn't seem like all of the speakers are running.
  • jsgroove
    jsgroove over 11 years
    Am installing an antivirus and will do a global scan, then will try an external keyboard, then will try reinstalling the OS. If you have any other ideas in between these, let me know. Thanks!
  • Dave
    Dave over 11 years
    Or, the computer is old and the motherboard is failing. What ever happens at this point, BACK UP FIRST
  • jsgroove
    jsgroove over 11 years
    The laptop is 2 and a half years old. Well, even if the motherboard will fail, my data should be safe on the hard drive, I don't think that it will be a problem of losing it, just accessing it for a while.
  • Admin
    Admin over 8 years
    i have reinstalled windows 7 but the problem is still there.
  • harrymc
    harrymc over 8 years
    If you have reinstalled Windows as an upgrade, you have probably conserved the problem as-is.
  • Admin
    Admin over 8 years
    no. i took a backup of my data and installed a fresh installation.
  • harrymc
    harrymc over 8 years
    If the problem happens on vanilla Windows 7, with no third-party products installed, then it is most probably a hardware problem. As verification, boot a Linux CD and see if the problem still occurs; if it does then this is absolutely a hardware problem.
  • niksmac
    niksmac over 6 years
    Error is still there, I tried the . catch , await and defined user.
  • Alexander Bicukow
    Alexander Bicukow about 2 years
    That's so stupid, but that worked