Alex_Castro

Commodore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-08-06
14:27
251 views
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.
1 Solution
Accepted Solutions
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-08-06
20:28
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
2 Replies
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-08-06
20:28
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
Alex_Castro

Commodore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2019-08-06
21:12
That worked, thank you!