Questions tagged [capslock]

Caps lock is a lock key found on many computer keyboards, depending on the local keyboard layout they implement.

Typical Caps lock behaviour is that pressing the key sets an input mode in which all typed letters are uppercase by default (i.e. in All caps). The keyboard remains in caps lock mode until the key is pressed again.

Keyboards often include a small LED to indicate that Caps lock is active, either on the key itself or in a row with Scroll lock and Num lock indicators. While on the original IBM PC keyboard this LED was controlled by the keyboard itself, it is under software control of the computer since the introduction of the IBM AT. Some new laptop and wireless desktop keyboards lack the LED, instead providing software that gives an on-screen indicator.

The Caps lock key is a modified version of the Shift lock key that occupies the same position on the keyboards of mechanical typewriters.

158 questions
11
votes
1 answer

How to Detect Caps Lock in a Vimrc Function

When editing code in Vim, I will often use caps lock when writing stuff in ALL CAPS. However, I often forget to turn off caps lock when I'm done with the capitalized portion. This causes no end of pain (since, ie, j moves down, but J joins the…
Sam King
  • 2,068
  • 18
  • 29
10
votes
3 answers

How can I get the Caps Lock state, and set it to on, if it isn't already?

I would like a specific example on how to turn caps lock on if it is off. I know how to toggle the key, I have been using this: toolkit.setLockingKeyState(KeyEvent.VK_CAPS_LOCK, Boolean.TRUE); That will change the state of the key whether it is on…
Mike George
  • 521
  • 3
  • 11
  • 27
9
votes
2 answers

Check Scroll Lock, Num Lock & Caps Lock in JavaScript on Page Load

Is it possible to check the status of Scroll Lock, Num Lock and Caps Lock on page load of a web page? I've found ways to check after a keypress using JavaScript, but that's not what I'm asking.
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
8
votes
4 answers

How to detect Caps Lock state on page load (that is, not on keypress) with JavaScript?

So I've been researching solutions for Caps Lock detection for a form, using JavaScript/jQuery. There is a huge thread on stackoverflow offering many solutions. But the only problem is they don't check whether Caps Lock is pressed directly per se.…
user5102448
8
votes
3 answers

How do I check if the caps lock key is pressed?

Alright, before this gets flagged as a possible duplicate, I've already tried the following code: Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK) And it is always returning false for me [see below]. Could someone confirm if…
Alex Coleman
  • 7,216
  • 1
  • 22
  • 31
7
votes
2 answers

Programmatically disable caps lock

I'm using SendKeys in an automation program for work. I've been plodding along, and am now trying to iron out all the bugs that I've created :-) One of which, is that when I used SendKeys.Send("Test"), if the CapsLock is on, it will produce "tEST"…
HeWhoWas
  • 601
  • 1
  • 10
  • 22
7
votes
3 answers

How to prevent users writing with caps lock?

I don't really like people who write with Caps Lock. In addition the aversion, it defaces the whole application. I am wondering how to prevent users writing all characters with caps lock. I cannot force all text to lowercase due to special names and…
quosal
  • 167
  • 1
  • 2
  • 10
6
votes
3 answers

detect caps lock status on page load (or similar)

In my research, I've found how to detect capslock when the caps key is pressed. However, I want to know the caps status even in cases when the key is not touched. example: alert(ui.Keyboard.capslock) // would return true or false; Thanks!
Jacksonkr
  • 31,583
  • 39
  • 180
  • 284
6
votes
4 answers

Detect and warn users about caps lock is on

How to implement to detecting and warning users when caps lock is on with (or not) tooltip style in typescript (angular 4.2.2)?? Maybe with some keyup events, or like toUpperCase() in JS.
Eduard Arevshatyan
  • 648
  • 3
  • 18
  • 34
6
votes
3 answers

setxkbmap setting lost when I switch keyboard layout in Ubuntu 16.04

I set my Caps Lock to be a Ctrl in Ubuntu 16.04 using: setxkbmap -option 'caps:ctrl_modifier' But when I change my keyboard from En to Cs, the Caps Lock becomes a Caps Lock again, not a Ctrl. To fix it, I have to execute the above setxkbmap…
Ondřej Čertík
  • 780
  • 8
  • 18
6
votes
3 answers

How to hijack the Caps Lock key for Cut, Copy, Paste keyboard operations

Here is what I am trying to accomplish: To Copy, press and release Caps Lock ONCE To Paste, press and release Caps Lock TWICE, quickly To Cut, press Ctrl+Caps Lock The reason I want to do this is often times i find my self looking down to press…
Liao
  • 1,225
  • 3
  • 14
  • 22
6
votes
5 answers

Warn about CapsLock

I have a DataGridTemplateColumn with DataTemplate as a PasswordBox. I want to warn user if CapsLock is toggled. private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) { if (Keyboard.GetKeyStates(Key.CapsLock) ==…
iLemming
  • 34,477
  • 60
  • 195
  • 309
6
votes
1 answer

How can I check if capslock is on without waiting for the user to type character using JavaScript?

Gmail shows an icon in Chrome when the user has capslock on and focuses on the password field, how are they able to do that? There are many related question to this, but no one seem to know how to do it without user input, like: How do you tell if…
Kit Sunde
  • 35,972
  • 25
  • 125
  • 179
5
votes
3 answers

Is it possible to programmatically disable the Caps Lock key on Windows?

The Caps Lock key is driving me nuts - I never use it intentionally, but sometimes accidentially press it instead of TAB. My current solution is to remove the button with a screwdriver (no damage, can be placed back if ever needed). Is there a way…
sharptooth
  • 167,383
  • 100
  • 513
  • 979
5
votes
2 answers

Emacs caps lock minor mode?

Is there a command in Emacs to turn on what might be described as "caps lock minor mode"? I'm looking to do something like M-x toggle-caps-mode, then every letter I type in the buffer is a capital letter until I do M-x toggle-caps-mode again. Note:…
dantswain
  • 5,427
  • 1
  • 29
  • 37
1
2
3
10 11