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
2
votes
1 answer

How can I turn on/off Caps Lock, Scroll Lock, Num Lock key programatically

Here some come code in linux for example: void set_leds(int val) { int fd = open ("/dev/console", O_WRONLY); // argument (Bit 0 - Scroll Lock, Bit 1 - Num Lock, Bit 2 - Caps lock) ioctl (fd, KDSETLED, val); close(fd); } void…
MaysSpirit
  • 43
  • 2
  • 8
2
votes
1 answer

Caps Lock Detection - Windows 10 vs Windows 10 Mobile - C#

I need to detect if the CapsLock Key is Locked (active) or not, but when I try this: public void CapsLockStatus() { if ((CoreWindow.GetForCurrentThread().GetKeyState(VirtualKey.CapitalLock) & CoreVirtualKeyStates.Locked) != 0) { …
fipcurren88
  • 701
  • 5
  • 26
2
votes
3 answers

How to count CAPSLOCK in string using R

In src$Review each row is filled with text in Russian. I want to count the CAPSLOCK in each row. For example, in "My apple is GREEN" I want to count not just the quantity of capital letters, but the amount of CAPSLOCK (without "My", only "GREEN").…
Ruslan Seletskiy
  • 309
  • 3
  • 14
2
votes
0 answers

How to prevent NumLock from disabling?

I'm making a simple game and I want to control it using numeric keyboard (including NumLock key). A player should be able to press several keys simultaneously, or press and hold any key. After NumLock key is pressed, I have to turn NumLock back on…
grabantot
  • 2,111
  • 20
  • 31
2
votes
2 answers

autohotkey caps lock to ctrl not releasing

I'm using AutoHotkey to map the Caps Lock to Ctrl, and trying to use the Ctrl + K as Tab in Total Commander. SetCapsLockState AlwaysOff Capslock::Ctrl #ifWinActive ahk_class TTOTAL_CMD ^k::Send, {Tab} #ifWinActive When i using the Ctrl + K remap…
bimlas
  • 2,359
  • 1
  • 21
  • 29
2
votes
1 answer

Mapping caps lock in vim only?

I'd really like to be able to map the caps lock key to Ctrl, but only in vim. I saw this, but I'm using OS X. Is there an OS X alternative to AutoHotKey, or is there another way to create an application-specific mapping for a modifier key?
Adam Incera
  • 117
  • 1
  • 5
2
votes
3 answers

Way to turn on keyboard's caps-lock light without actually turning on caps-lock

I'm writing a program that uses Caps Lock as a toggle switch. It would be nice to set the LED of the key to show that my program is on or off, like the Caps Lock key does naturally. I know that I could just SendInput('Capslock'); or whatever to…
ck_
  • 3,719
  • 10
  • 49
  • 76
2
votes
0 answers

Javascript - check if CAPS LOCK is ON on load of HTML page. Possible?

I want to alert to user if CAPS LOCK is ON when HTML page get load. I have tried search in google and got multiple views from people some are saying possible some are saying not possible. I have code which will alert to user only when they type…
SK.
  • 4,174
  • 4
  • 30
  • 48
2
votes
1 answer

XKB - Get Caps Lock mask

I've been trying to write a program that enables/disables different locks (num lock, caps lock, scroll lock), but I've been having issues with caps lock. For some reason, XKB doesn't know about "CapsLock" vmod, while it does know about ScrollLock…
MiJyn
  • 5,327
  • 4
  • 37
  • 64
2
votes
4 answers

Capslock warning

I'm trying to create an application so when the user tries to enter a capslock letter in a JTextfield or something it will bring up an error informing the user to turn off the capslock. import java.awt.*; import java.awt.event.*; public class…
JOHN
  • 33
  • 6
2
votes
1 answer

Including Caps lock detection in HTML5

Will there be any plan to implement caps lock detection in html5 or some other spec. This seems like a pretty simple functionality to be missing.
Sophie
  • 780
  • 6
  • 18
2
votes
2 answers

Is it possible to trigger a keyboard button with JavaScript?

Is it possible to trigger a keyboard button with JavaScript, and to get a input-case depending on the Caps Lock button? So, if my Caps Lock is on, "IT SHOULD BE UPPERCASED" or "it should be lowercased if it's off".
user1386320
2
votes
1 answer

How do I swap CTRL and CAPS LOCK on Carbon Emacs on OSX without doing it OS-wide?

I've recently started learning emacs since I was unhappy with Textmate and as a starting point read the "Effective Emacs" article by Steve Yegge. I was very keen on his CTRL -> CAPS LOCK swap, but I don't want to do it OS-wide, I want this swap to…
Eduardo Del Balso
2
votes
2 answers

What is the numeric ID for caps lock?

I need to check if caps lock is pressed, and found a function that requires an int online. [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern short GetKeyState(int keyCode);
derp_in_mouth
  • 2,003
  • 4
  • 15
  • 17
2
votes
3 answers

Javascript/jQuery: Unable to get proper keyCode when capsLock is ON

I'm trying to determine the proper key/char code in javascript when a key is pressed. It seems that when the CapsLock key is on, lowercase letters are not detectable. Try the combinations: 1. a = a (97) shift:false 2. Shift+A …
sramam
  • 118
  • 2
  • 5