bool? CapsLockEnabled (bool?)

Gets or sets caps lock key state

Security

Trust Level Required: Low Trust

Parameters

Name Description
enable (Optional) bool?
Enables or disables the caps lock key if specified. Defaults to null.

Return

True if the caps lock key is enabled, false otherwise.

Remarks

This method can be used in the event that the user has access to a physical keyboard. It can also be used on the virtual keyboard.

Examples


let inputs = document.getElementsByTagName('input');

window.addEventListener('keydown', checkInputs);

function checkInputs(e) {
  if(e.code == 'CapsLock'){
		for(let input of inputs){
			if(KioUtils.CapsLockEnabled()) input.value = 'CAPS LOCK ENABLED';
			else input.value = '';
		}
	}
}

Requirements

KioWare for Windows version 8.3 or greater.