Keyboard Disco Trick (Windows)


Keyboards usually have small LED's which indicate whether different types of locks are activated or not.
Here is a trick to use the lights of your keyboard in a more creative manner in Windows.
This trick uses a simple Visual Basic Script which when activated makes your Scroll lock, Caps lock and Num lock LEDs flash in a cool rhythmic way which gives the perception of a live disco on your keyboard.

This has been tested on Windows XP, Windows Vista, Windows 7 and Windows 8 and found to be working perfectly.

How to create a custom audio login message..


Make your live keyboard disco

1.  Open Notepad.
2.  Copy paste the exact code given below:

Sponsored Link

Set wshShell =wscript.CreateObject("WScript.Shell")
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
wshshell.sendkeys "{NUMLOCK}"
wshshell.sendkeys "{SCROLLLOCK}"

Save the file as Disco.vbs

Important! (make sure to change the "Save As Type" option to "All Files" when saving the file in order for the ".vbs" to take affect.)

Enable Disco Lights:

Double click on the saved file to see the LED lights on your keyboard go crazy and make your own cool disco.

Disable Disco Lights:

You can disable the keyboard disco by starting Task Manager and ending the wscript.exe process.


Get more creative with the "Sendkeys function"

keyboard disco

Using the "SendKeys" command you can easily create scripts to perform and automate key press actions and events.
If you want to extend from the example above and get a bit more creative or automate more complex tasks with scripts, these common examples will send you off in the right direction.

Single and multiple key or mouse actions:

The <Key or Mouse> parameter corresponds to the mouse actions or to the keystrokes used to run the shortcut. Each key is represented by one or more characters. There is no need to specify "Ctrl-Alt" that is automatically added. No shortcut key is specified by default.

To use a single keyboard character, you must use the character itself. For example, to represent the letter A, assign the value "A" to <Key or Mouse>.

To use a set of characters, use the set of characters directly ("ADB").
Caution: A special meaning is assigned by the function to the following characters:

  • plus (+),
  • insertion (^),
  • percentage (%),
  • brackets ( ).

To use one of these characters, the character must be enclosed in curly brackets. For example, to use the plus sign "+", type {+}. To use curly brackets, use the {{} and {}} characters.To use special characters, specific codes are required to identify:

  • for characters with no action on the screen (the Enter key for example),
  • for characters corresponding to an action (the function keys for example).

You must use the following codes:

Key Code Key Code
F1 {F1} F2 {F2}
F3 {F3} F4 {F4}
F5 {F5} F6 {F6}
F7 {F7} F8 {F8}
F9 {F9} F10 {F10}
F11 {F11} F12 {F12}
F13 {F13} F14 {F14}
F15 {F15} F16 {F16}
+ on the numeric keypad {NUM+} - on the numeric keypad {NUM-}

To specify a key combination with MAJ, CTRL or ALT, the standard code of the key must be preceded by one or more codes among the following ones:

Key Code

To specify that the MAJ, CTRL and/or ALT key must be kept down while pressing another key: for example, in order for the SHIFT key to be kept down while pressing the E key, use "+e".

To specify that a key must be repeated, you must use an expression such as {<Key> <Number>}. Note: a space character is required between <Key> and <Number>. For example:

  • {LEFT 42} means that the Left key must be pressed 42 times,
  • {h 10} means that the h key must be pressed 10 times.

To specify the operations performed with the mouse, you must use the following codes:

Operation Code
Click with left mouse button {LEFTBTN[,x[,y]]}
Double click with left mouse button {LEFTBTN2[,x[,y]]}
Left mouse button down {LEFTBTN+[,x[,y]]}
Left mouse button up {LEFTBTN-[,x[,y]]}
Click with right mouse button {RIGHTBTN[,x[,y]]}
Double click with right mouse button {RIGHTBTN2[,x[,y]]}
Right mouse button down {RIGHTBTN+[,x[,y]]}
Right mouse button up {RIGHTBTN-[,x[,y]]}
Click with middle mouse button {MIDDLEBTN[,x[,y]]}
Double click with middle mouse button {MIDDLEBTN2[,x[,y]]}
Middle mouse button down {MIDDLEBTN+[,x[,y]]}
Middle mouse button up {MIDDLEBTN-[,x[,y]]}
Mouse movements {MOUSE[,x[,y]]}

x and y are respectively the X coordinates and the Y coordinates in relation to the client area of the destination window. If x or y is not specified, the value used is 0.