Skip to main content

Is there a command to detect whether the Caps lock, Num lock, or the Insert key are on in managed COBOL? The command in C# is something like:

 

if (Control.IsKeyLocked(Keys.CapsLock))

    do something

end if.

 

The following command in managed COBOL only detect whether the keys were pressed but does not detect whether the caps lock is on:

 

if e::KeyCode = type Keys::CapsLock

    do something

end-if.

Is there a command to detect whether the Caps lock, Num lock, or the Insert key are on in managed COBOL? The command in C# is something like:

 

if (Control.IsKeyLocked(Keys.CapsLock))

    do something

end if.

 

The following command in managed COBOL only detect whether the keys were pressed but does not detect whether the caps lock is on:

 

if e::KeyCode = type Keys::CapsLock

    do something

end-if.

You can check this using the same syntax as the C# snippet

if type Control::IsKeyLocked(type Keys::CapsLock) display "caps on" else display "caps off" end-if

You can check this using the same syntax as the C# snippet

if type Control::IsKeyLocked(type Keys::CapsLock) display "caps on" else display "caps off" end-if
That worked, thank you!