Getkey1, Getkey2, Getkey3 Commands

 Getkey1, Getkey2, Getkey3
<C.Basic>

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
Getkey3 (<timer value>)
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]
Getkey3: [F3](CMD) -> [down]/[up] -> [4](4:Getkey)[3]


Function
  1. Getkey1: Wait until any key is pressed.
  2. Getkey2: Clear key buffer then wait until any key is pressed.
  3. Getkey3 (<timer value>): Wait for time set by <timer value>.
  4. 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
  1. Keycode is compatible with fx-9860GII Casio Basic.
  2. 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.
  3. 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.
  4. 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.

Note
1. When Getkey1 does not work with SH3 model, use Getkey2.  


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.




See also: %, Ticks, Getkey

Copyright (C) 2013 - 2016 Krtyski / egadget.blog.fc2.com  All Rights Reserved.

関連記事

テーマ : プログラム関数電卓
ジャンル : コンピュータ

コメントの投稿

非公開コメント

最新記事
検索フォーム
最新コメント
カテゴリ
C# (3)
Online Counter
現在の閲覧者数:
プロフィール

やす (Krtyski)

Author:やす (Krtyski)
since Oct 30, 2013


プログラム電卓は、プログラムを作って、使ってナンボ!

プログラム電卓を実際に使って気づいたこと、自作プログラム、電卓での Casio Basic, C.Basic そして Casio Python プログラミングについて書いています。

なお管理人はカシオ計算機の関係者ではありません。いつでもどこでもプログラミングができるプログラム電卓が好きな1ユーザーです。


写真: 「4駆で泥んこ遊び@オックスフォード郊外」

リンク
月別アーカイブ
Sitemap

全ての記事を表示する

ブロとも申請フォーム

この人とブロともになる

QRコード
QR