Getkey1, Getkey2, Getkey3 Commands
Getkey1, Getkey2, Getkey3
This content is checked by fx-9860GII (OS 2.04).
This is on-going project, any changes may be made.
Model
fx-9860G Series
Syntax
Getkey1
Getkey2
Getkey2
Getkey3 (<timer value>)
Getkey3 (<timer value2>,<timer value1>)
Getkey3 (<timer value2>,<timer value1>)
Key Press
Getkey1: [F3](CMD) -> [down]/[up] -> [4](4:Getkey)[1]
Getkey2: [F3](CMD) -> [down]/[up] -> [4](4:Getkey)[2]
Getkey2: [F3](CMD) -> [down]/[up] -> [4](4:Getkey)[2]
Getkey3: [F3](CMD) -> [down]/[up] -> [4](4:Getkey)[3]
Function
- Getkey1: Wait until any key is pressed.
- Getkey2: Clear key buffer then wait until any key is pressed.
- Getkey3 (<timer value>): Wait for time set by <timer value>.
- Getkey3 (<timer value2>,<timer value1>): Wait for time between <timer value1> and <timer value2>.
* 1 tick of <timer value> = 1/128 sec (128 ticks = 1 sec).
Description- Keycode is compatible with fx-9860GII Casio Basic.
- Casio Basic original Getkey can get a keycode in a ceertain time frame, but user cannot controlled the time frame. In order to obtain a keykode within the time frame, Getkey is used in a loop statement.
- Getkey1 and Getkey2 wait until any key is pressed. Therefore user do not need to use those commands in a loop statement. During waiting for any key press, no busy marker is displayed on screen.
- Getkey3 is similat to Casio Basic original Getkey which is usually used in a loop command. Unlike Getkey, user can control time to get a keycode with Getkey3.
Example 1: Keycode Check Program using GetKey1
Do
Locate 1,1,"Press any key"
Getkey1→K
Locate 1,3,"Keycode="
Locate 9,3,K
LpWhile 1
Getkey1 halts obtaining a keycode until any key is pressed. But it cannot obtain keycode of [AC] and [MENU] key.
Example 2: Keycode Check Program using Getkey
Do
Locate 1,1,"Press any key"
Do:Getkey→K
LpWhile K=0
Locate 1,3,"Keycode="
Locate 9,3,K
LpWhile 1
The Do loop with Getkey provides same function of Example 1.
Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com All Rights Reserved.
- 関連記事
-
- Switch Statement 2014/08/01
- ElseIf Statement 2014/08/01
- Locate Command (C.Basic) 2014/08/01
- LocateYX Command 2014/08/01
- Getkey1, Getkey2, Getkey3 Commands 2014/08/01