caps lock somehow 'on' yet keyboard shows it off #20153

Closed
opened 2026-01-31 07:05:12 +00:00 by claunia · 12 comments
Owner

Originally created by @dovholuknf on GitHub (Jun 27, 2023).

Windows Terminal version

1.18.1462.0

Windows build number

10.0.22621.1848

Other Software

No response

Steps to reproduce

No clue. I'm just using the terminal, splitting the panes, running docker commands etc and sometimes this happens with this preview version

Expected Behavior

i expect when my caps lock is off, that my caps lock is off... bug is self evident

Actual Behavior

caps lock is on, when caps lock is NOT on. I just went to make a screen capture and it somehow resolved itself... so that's fun... if i can record a gif I will.

Originally created by @dovholuknf on GitHub (Jun 27, 2023). ### Windows Terminal version 1.18.1462.0 ### Windows build number 10.0.22621.1848 ### Other Software _No response_ ### Steps to reproduce No clue. I'm just using the terminal, splitting the panes, running docker commands etc and sometimes this happens with this preview version ### Expected Behavior i expect when my caps lock is off, that my caps lock is off... bug is self evident ### Actual Behavior caps lock is on, when caps lock is NOT on. I just went to make a screen capture and it somehow resolved itself... so that's fun... if i can record a gif I will.
claunia added the Needs-TriageIssue-BugNeeds-Author-FeedbackNo-Recent-Activity labels 2026-01-31 07:05:12 +00:00
Author
Owner

@lhecker commented on GitHub (Jun 27, 2023):

In which application and under which circumstances did this bug occur?
It's at least somewhat unlikely to be a bug in this project. While we do handle uppercase/lowercase flags in various parts of the code, we don't really convert the letter case of the actual text anywhere.

@lhecker commented on GitHub (Jun 27, 2023): In which application and under which circumstances did this bug occur? It's at least somewhat unlikely to be a bug in this project. While we do handle uppercase/lowercase flags in various parts of the code, we don't really convert the letter case of the actual text anywhere.
Author
Owner

@dovholuknf commented on GitHub (Jun 27, 2023):

Yeah it's really strange. It's just bash running. I'll run a docker command, ctrl-c, run another, switch panes, that sort of thing and then i'll start typing AND ALL CAPS POPS OUT.

The ONLY reason I reported it is because it seems to come around the strange "bell when changing windows" bug (if you recall that one) where when my mouse moves from one pane to another the "bell" dings audibly and visually when leaving the frame. After that I make a new pane (cause it never stops ding'ing) and that new pane seeeeems to have the caps locked on it? maybe? I wish I could just have a screen recorder on fulltime to capture that exact moment.... :/

Anyway, it's become kinda annoying and it seems to be a new issue I've not ever had before... Lots of "unhelpful" info here, I know... If i can narrow it down at all, i'll post back

@dovholuknf commented on GitHub (Jun 27, 2023): Yeah it's really strange. It's just bash running. I'll run a docker command, ctrl-c, run another, switch panes, that sort of thing and then i'll start typing AND ALL CAPS POPS OUT. The ONLY reason I reported it is because it __seems__ to come around the strange "bell when changing windows" bug (if you recall that one) where when my mouse moves from one pane to another the "bell" dings audibly and visually when leaving the frame. After that I make a new pane (cause it never stops ding'ing) and that new pane seeeeems to have the caps locked on it? maybe? I wish I could just have a screen recorder on fulltime to capture that exact moment.... :/ Anyway, it's become kinda annoying and it seems to be a new issue I've not ever had before... Lots of "unhelpful" info here, I know... If i can narrow it down at all, i'll post back
Author
Owner

@dovholuknf commented on GitHub (Jun 27, 2023):

Actually, you can watch it happen to me. I was livestreaming yesterday and I was just reviewing that stream now for some information when i heard 'the bell' pop, and then i see my caps lock got toggled. You can see me look down at the keyboard and hit capslock once/twice to un-caps lock...

https://www.twitch.tv/videos/1856211857 you'll need to scrub over to 19:20... I did the following:

  • docker run --rm crccheck/hello-world (a simple docker container that just lets you curl the 'docker whale'
  • I used "shift-alt-minus" to make a new pane under the one i was just working on.
  • I started typing 'curl' but you can see "URL" comes out
  • I notice URL and try to hit ctrl-c to cancel what i was doing and just start typing again but you hear the bell and you see the screen flash (audible bell)
  • i keep typing: curl http://localhost and at that very moment you see the caps lock togggle over and i type LOCAL
  • I notice LOCAL and say "what is going on" and look down at my keyboard confused, and toggle the caps lock button a couple of times to clear/reset the caps lock....
@dovholuknf commented on GitHub (Jun 27, 2023): Actually, you can watch it happen to me. I was livestreaming yesterday and I was just reviewing that stream now for some information when i heard 'the bell' pop, and then i see my caps lock got toggled. You can see me look down at the keyboard and hit capslock once/twice to un-caps lock... https://www.twitch.tv/videos/1856211857 you'll need to scrub over to 19:20... I did the following: * docker run --rm crccheck/hello-world (a simple docker container that just lets you curl the 'docker whale' * I used "shift-alt-minus" to make a new pane under the one i was just working on. * I started typing 'curl' but you can see "URL" comes out * I notice URL and try to hit ctrl-c to cancel what i was doing and just start typing again but you hear the bell and you see the screen flash (audible bell) * i keep typing: `curl http://localhost` and at that very moment you see the caps lock togggle over and i type LOCAL * I notice LOCAL and say "what is going on" and look down at my keyboard confused, and toggle the caps lock button a couple of times to clear/reset the caps lock....
Author
Owner

@carlos-zamora commented on GitHub (Jun 28, 2023):

Curious, can you get this to repro in the original windows console host?

@carlos-zamora commented on GitHub (Jun 28, 2023): Curious, can you get this to repro in the original windows console host?
Author
Owner

@dovholuknf commented on GitHub (Jun 28, 2023):

No. I don't even know what/how it happens in windows terminal. However, an interesting (maybe) bit of more information is that docker is somehow causing the "bell bug". I happened to be using docker in a VM (because sadly, WSL still doesn't have bridged networking) and was using tilix there with split windows, just like I do with windows terminal and i had "the bell bug" hit the VM too. That was entirely unexpected. I have absolutely no idea how to reproduce the bell bug, nor how to reproduce the bizzare "caps lock suddenly comes on".

I only filed this bug on a whim that someone else has the situation happen to them. Since I can't reproduce the bug, I'm sure this bug will just sit out here and go stale, but we'll see if anyone else hits this.

@dovholuknf commented on GitHub (Jun 28, 2023): No. I don't even know what/how it happens in windows terminal. However, an interesting (maybe) bit of more information is that `docker` is somehow causing the "bell bug". I happened to be using docker in a VM (because sadly, WSL still doesn't have bridged networking) and was using `tilix` there with split windows, just like I do with windows terminal and i had "the bell bug" hit the VM too. That was entirely unexpected. I have __absolutely__ no idea how to reproduce the bell bug, nor how to reproduce the bizzare "caps lock suddenly comes on". I only filed this bug on a whim that someone else has the situation happen to them. Since I can't reproduce the bug, I'm sure this bug will just sit out here and go stale, but we'll see if anyone else hits this.
Author
Owner

@j4james commented on GitHub (Jul 3, 2023):

I wonder if this has something to do with the fact that you're using a keyboard shortcut with the Shift modifier, and there's a change of context happening at the same time, i.e. the keydown events are going to the initial pane, but the keyup events go to the new pane.

Maybe that results in the Shift key getting "stuck" somehow, which gives the impression that CapsLock is enabled. You can fix this temporarily by pressing CapsLock, since that will cancel out the Shift. However, the next time you press Shift (e.g. for the : in the URL), that's going to release the stuck key, and since you've now got CapsLock enabled, everything is going to be uppercase again.

Why it's getting stuck in the first place, I'm not sure. But the next time this happens I'd suggest hitting Shift a few times to try and reset it, rather than messing with CapsLock. I suspect that will work better.

@j4james commented on GitHub (Jul 3, 2023): I wonder if this has something to do with the fact that you're using a keyboard shortcut with the <kbd>Shift</kbd> modifier, and there's a change of context happening at the same time, i.e. the keydown events are going to the initial pane, but the keyup events go to the new pane. Maybe that results in the <kbd>Shift</kbd> key getting "stuck" somehow, which gives the impression that <kbd>CapsLock</kbd> is enabled. You can fix this temporarily by pressing <kbd>CapsLock</kbd>, since that will cancel out the <kbd>Shift</kbd>. However, the next time you press <kbd>Shift</kbd> (e.g. for the `:` in the URL), that's going to release the stuck key, and since you've now got <kbd>CapsLock</kbd> enabled, everything is going to be uppercase again. Why it's getting stuck in the first place, I'm not sure. But the next time this happens I'd suggest hitting <kbd>Shift</kbd> a few times to try and reset it, rather than messing with <kbd>CapsLock</kbd>. I suspect that will work better.
Author
Owner

@carlos-zamora commented on GitHub (Jul 5, 2023):

Slapping Needs-Author-Feedback to hear back from your experience with j4james' suggestion

@carlos-zamora commented on GitHub (Jul 5, 2023): Slapping Needs-Author-Feedback to hear back from your experience with j4james' suggestion
Author
Owner

@dovholuknf commented on GitHub (Jul 6, 2023):

I actually thought I had replied my bad. I've been trying to reproduce it and cannot. I like what @j4james is thinking, that could make sesne. I will close this issue for the timebeing and reopen it if I notice it happen again and I'm able to capture/reproduce. thanks

@dovholuknf commented on GitHub (Jul 6, 2023): I actually thought I had replied my bad. I've been trying to reproduce it and cannot. I like what @j4james is thinking, that could make sesne. I will close this issue for the timebeing and reopen it if I notice it happen again and I'm able to capture/reproduce. thanks
Author
Owner

@dovholuknf commented on GitHub (Aug 20, 2023):

This actually just happened to me again today. i tried to record a gif of it but apparently when terminal lost focus, or when i came back to a different pane in terminal it 'fixed itself'... it's the first time in a while this has happened...

@dovholuknf commented on GitHub (Aug 20, 2023): This actually just happened to me again today. i tried to record a gif of it but apparently when terminal lost focus, or when i came back to a different pane in terminal it 'fixed itself'... it's the first time in a while this has happened...
Author
Owner

@dovholuknf commented on GitHub (Jan 10, 2024):

it's happened again. it's definitely tied to the "open a new window" shortcut key. i use "shift+alt+-" all the time to make a new windows. i recorded my experience from my phone this time. as soon as i leave the app and give the app the focus again the issue is fixed.

pressing caps lock does not fix the issues. - key comes out as "_", = key comes out as +. I can upload the video if you like but I'm not sure it matters. it's hard to reproduce

@dovholuknf commented on GitHub (Jan 10, 2024): it's happened again. it's definitely tied to the "open a new window" shortcut key. i use "shift+alt+`-`" all the time to make a new windows. i recorded my experience from my phone this time. as soon as i leave the app and give the app the focus again the issue is fixed. pressing caps lock does not fix the issues. `-` key comes out as "_", `=` key comes out as `+`. I can upload the video if you like but I'm not sure it matters. it's hard to reproduce
Author
Owner

@j4james commented on GitHub (Jan 10, 2024):

pressing caps lock does not fix the issues

My suggestion was that you press the Shift key to try and fix it.

@j4james commented on GitHub (Jan 10, 2024): > pressing caps lock does not fix the issues My suggestion was that you press the <kbd>Shift</kbd> key to try and fix it.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Jan 15, 2024):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@microsoft-github-policy-service[bot] commented on GitHub (Jan 15, 2024): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20153