Not the stdIO class, just the console.
I'm specifically trying to find out if it can read arrow and function keys, not only character strings.
But also generally, I just need the console reference.
Yes, I tried searching the forum for 'console', but the response is that 'console' is too common a term.
-
- Active Member
- Posts: 25
- Joined: 6 Aug 2012 16:56
- Thomas Linder Puls
- VIP Member
- Posts: 1465
- Joined: 28 Feb 2000 0:01
Re: Can you forward a link to the docs for the console class?
There is not more documentation than what you see in the console.cl file. To deal key presses etc you will have readEvents (blocking) or getEventQueue (non-blocking):
Code: Select all
domains
event =
key(unsigned KeyDown, unsigned RepeatCount, unsigned VirtualKeyCode,
unsigned VirtualScanCode, char UnicodeChar, unsigned ControlKeyState);
mouse(unsigned CoordX, unsigned CoordY, unsigned ButtonState,
unsigned ControlKeyState, unsigned EventFlags);
size(unsigned CoordX, unsigned CoordY);
menu;
focus.
predicates
readEvents : () -> event* EventList.
% @short Read events or wait
% @end
predicates
getEventQueue : () -> event* EventList.
% @short Read events or return empty list
% @end
Regards Thomas Linder Puls
PDC
PDC
-
- Active Member
- Posts: 25
- Joined: 6 Aug 2012 16:56
Re: Can you forward a link to the docs for the console class?
Hi, Thomas.
"There is not more documentation than what you see in the console.cl file."
I didn't know about the existence of that file. Looking at it now, thanks.
"To deal key presses etc you will have readEvents (blocking) or getEventQueue (non-blocking):"
Thanks. Do the console apps have Event support, or do they only work for guis?
"There is not more documentation than what you see in the console.cl file."
I didn't know about the existence of that file. Looking at it now, thanks.
"To deal key presses etc you will have readEvents (blocking) or getEventQueue (non-blocking):"
Thanks. Do the console apps have Event support, or do they only work for guis?
- Thomas Linder Puls
- VIP Member
- Posts: 1465
- Joined: 28 Feb 2000 0:01
Re: Can you forward a link to the docs for the console class?
No, you will have to call one of the two mentioned predicates.
Regards Thomas Linder Puls
PDC
PDC