====== Keyboard scan codes ====== Since version 3.1.13, keyboard scan codes are available as predefined constants for some targets. All you need to do is [[v3:include|]] the keyboard definition for the platform you're targeting. For example: INCLUDE "keycodes_c64.bas" ' For the Commodore-64 PRINT "press f1" DO UNTIL KEY(KEY_F1) <> 0 LOOP Click on each link to see what constants the library files define. ^ Platform ^ Library file to include ^ | Commodore-64 | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_c64.bas|keycodes_c64.bas]] | | Commodore-128 | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_c128.bas|keycodes_c128.bas]] | | Commodore-16 and Plus/4 | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_c264.bas|keycodes_c264.bas]] | | Commodore VIC-20 | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_vic20.bas|keycodes_vic20.bas]] | | Commodore PET (business, UK) | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_pet_business_uk.bas|keycodes_pet_business_uk.bas]] | | Commodore PET (business, US) | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_pet_business_us.bas|keycodes_pet_business_us.bas]] | | Commodore PET (graphics) | [[https://github.com/neilsf/xc-basic3/blob/main/lib/keycodes_pet_graphics.bas|keycodes_pet_graphics.bas]] |