Computer Science Canada keyboard input help |
Author: | TokenHerbz [ Sat Jul 23, 2005 2:43 am ] | ||
Post subject: | keyboard input help | ||
i seen this in the help files
But, i tryed KEY_SPACEBAR / KEY_BAR / KEY_SPACE / KEY_SPACE_BAR and well.... Can u post what i have to type to get the unput of all the keys on the keyboard... Also, how do you rig up a press any key to continuue? Thanks |
Author: | jamonathin [ Sat Jul 23, 2005 7:35 am ] |
Post subject: | |
Well, what happens is, (KEY_WHATEVER) only works for 'keys' that dont make a character. such as (KEY_LEFT_ARROW) , (KEY_PGDN), (KEY_ENTER). Anything else all you do is type ('key') where key is whatever button you pressed. So space bar is (' ') and q is ('q') |
Author: | Delos [ Sat Jul 23, 2005 10:47 am ] |
Post subject: | |
F10 wrote: Here is a list of most of the constants KEY_F1 .. KEY_F12 KEY_CTRL_A .. KEY_CTRL_Z KEY_SHIFT_F1 .. KEY_SHIFT_F12 KEY_ALT_A .. KEY_ALT_Z KEY_CTRL_F1 .. KEY_CTRL_F12 KEY_ALT_1 .. KEY_ALT_0 KEY_ALT_F1 .. KEY_ALT_F12 KEY_HOME KEY_CTRL_HOME KEY_UP_ARROW KEY_CTRL_UP_ARROW KEY_PGUP KEY_CTRL_PGUP KEY_LEFT_ARROW KEY_CTRL_LEFT_ARROW KEY_RIGHT_ARROW KEY_CTRL_RIGHT_ARROW KEY_END KEY_CTRL_END KEY_DOWN_ARROW KEY_CTRL_DOWN_ARROW KEY_PGDN KEY_CTRL_PGDN KEY_INSERT KEY_CTRL_INSERT KEY_DELETE KEY_CTRL_DELETE KEY_BACKSPACE KEY_KEYPAD_5 * KEY_TAB KEY_SHIFT * KEY_ENTER KEY_CTRL * KEY_ESC KEY_ALT * KEY_CTRL_OPEN_BRACKET KEY_CTRL_BACKSLASH KEY_CTRL_CLOSE_BRACKET KEY_CTRL_CARET KEY_CTRL_UNDERSCORE KEY_CTRL_BACKSPACE KEY_ALT_MINUS KEY_ALT_EQUALS KEY_BACK_TAB KEY_SHIFT_TAB Above constants with "ORD_" instead of "KEY_" ORD_A .. ORD_Z ORD_0 .. ORD_9 ORD_LOWER_A .. ORD_LOWER_Z ORD_SPACE ORD_EXCALAMATION_MARK ORD_QUOTATION_MARK ORD_HAS_MARK ORD_DOLLAR_SIGN ORD_PERCENT_SIGN ORD_AMPERSAND ORD_SINGLE_QUOTE ORD_OPEN_PARENTHESIS ORD_CLOSE_PARENTHESIS ORD_ASTERISK ORD_PLUS ORD_COMMA ORD_MINUS ORD_PERIOD ORD_DOT ORD_SLASH ORD_COLON ORD_SEMICOLON ORD_LESS_THAN ORD_EQUALS ORD_GREATER_THAN ORD_QUESTION_MARK ORD_AT_SIGN ORD_OPEN_BRACKET ORD_BACKSLASH ORD_CLOSE_BRACKET ORD_CARET ORD_UNDERSCORE ORD_APOSTROPHE ORD_OPEN_BRACE ORD_BAR ORD_CLOSE_BRACE ORD_TILDE As jamonathin said, you can just use (' ') for space. As for 'any key', you could just use an Input.Pause, which would give you your desired effect. |
Author: | TokenHerbz [ Sat Jul 23, 2005 12:25 pm ] | ||
Post subject: | |||
ok thank you.... If anywant wants to test it now!
Anyways, please look over in my bouncing balls forum, i still need help there. |
Author: | MysticVegeta [ Sat Jul 23, 2005 4:16 pm ] | ||
Post subject: | |||
Delos wrote: you could just use an Input.Pause, which would give you your desired effect.
actually i dont think so, if he wants to use it in a loop that will perform a function of an Input.Keydown key. i think
|
Author: | jamonathin [ Sat Jul 23, 2005 4:29 pm ] | ||||
Post subject: | |||||
MysticVegeta wrote:
he probabily doesn't know how to uset hat properly. Basically, if all you want is a "Press any key to continue" then
|
Author: | Delos [ Sat Jul 23, 2005 6:00 pm ] | ||
Post subject: | |||
I must express my confusion as to why Input.Pause would be an adverse function to use here.
This works quite nicely in any loop or other such place. Notice that Input.Flush that removes any buffered input, quite handy I might add. |
Author: | jamonathin [ Sat Jul 23, 2005 8:12 pm ] |
Post subject: | |
The only thing that I dont like about it is that it kinda takes away from programming. I could probabily explain this a little better but, what i mean is I personally would rather make a command, then use someone else's, especially when it's as basic as that. Because you could just stick that loop in a proc and call it 'Jamonathin.Pause'. I just try to stay away from using commands that I could do myself. Some things like drawfillcircle can be done with drawfillarc - doesn't really matter tho. And i guess you could use drawdot for drawline. There's a bunch of others that i just skip over and do myself, so I can understand the command and apply it the "technique" to other languages that I'm new to. But yeah, that's just me though. |
Author: | Cervantes [ Mon Jul 25, 2005 8:21 pm ] |
Post subject: | |
jamonathin wrote: The only thing that I dont like about it is that it kinda takes away from programming. I could probabily explain this a little better but, what i mean is I personally would rather make a command, then use someone else's, especially when it's as basic as that. Man, this is the second time I've quoted this. Thanks wtd! wtd wrote: Don't reinvent the wheel if there's an existing library function to do it for you Comon jamonathin: good programmers are lazy. ![]() |
Author: | [Gandalf] [ Mon Jul 25, 2005 8:26 pm ] |
Post subject: | |
Why remake something that already exists, when you can make something new with what does exist? Unless, of course you are remaking something better than the original. It's much more appreciated ![]() |
Author: | jamonathin [ Tue Jul 26, 2005 12:12 am ] |
Post subject: | |
I don't know about other people, but just the way I am, I'll look at something on the computer, or sometimes in real life, I'll think of how it would of been programmed. Then I wonder how life was created. Then think: Is God a 1337 H@X0R? i dunno man. just how i am at times. ![]() |
Author: | MysticVegeta [ Tue Jul 26, 2005 6:03 pm ] |
Post subject: | |
wow pausing commands occupy the topic for 11 replies! |
Author: | jamonathin [ Wed Jul 27, 2005 12:59 pm ] |
Post subject: | |
MysticVegeta wrote: wow pausing commands occupy the topic for 11 replies! Well that's what a difference of opinions will do ![]() |