Re: [cc65] Escape keys

Date view Thread view Subject view

From: Groepaz (groepaz_at_gmx.net)
Date: 2002-12-14 16:16:52


On Friday 13 December 2002 19:47, Greg King wrote:

> MagerValp's way is more transparent.  A programmer should not need to
> wonder if a key exists or not -- he simply should use it!  Each
> implementation "secretly" should take care of those "niggling" little
> details about "Is it there?", "Where is it?", "How does it look?", "Should
> there be a substitute?", and "What should be that substitute?".
>
> That example should be simply:
>
>         switch (cgetc()) {
>             ...
>             case CH_ESC:
>                 /* Do the escape-procedure. */
>                 ...
>                 break;
>             ...
>         }
>
> "Behind the scenes," the implementation's header-file would have chosen the
> appropriate character for that -- portable -- test.
>
> The same thing goes for the function-key names!  Do the Apple and Atari
> keyboards have actual function-keys, or did someone decide that pressing
> two keys simultaneously will have the same effect as a true function-key? 
> That's "appropriate substitution."  Do it for all targets -- every one of
> them should have ten function-keys -- real or simulated.  (If a keyboard
> physically doesn't have enough available codes, then perhaps, some codes
> could be "borrowed" from other key-combinations.  Would that really break
> any [well-written] programs?)

gotta agree with that :o)

-- 
          ___ ___ .___________________ .___________ _______.
    c=64 /   |   \|   \__    ___/     \ \_   _____/ \      \ [groepaz]
     gb /    '    \   | |    | /  \ /  \ |    __)_  /   |   \ gp32
    cgb \    .    /   | |    |/    '    \|        \/    |    \ psx
     gba \___|_  /|___| |____|\____|__  /_______  /\____|__  / dc
          -----\/-----'---------------\/--------\/---------\/
       http://www.hitmen-console.org    Hitmen WWW Headquarters
       http://fly.to/hitmen-groepaz     my personal playground
       http://rr.c64.org/silversurfer   home of the RR debugger
       ftp.musoftware.de/pub/groepaz    cc65 dump site

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2002-12-14 16:20:34 CET