-
-
Notifications
You must be signed in to change notification settings - Fork 490
Key Map
TIC supports input from up to 4 players. The keymap can be changed in the Game Menu which can be accessed by issuing the 'menu' command in the console or pressing escape during play in an exported cart. From the Game Menu, select 'Gamepad Config' then choose the desired tab, #1 to #4, for the relevant player.
btn(id) returns true if button is pressed in the current frame. btnp(id) returns true if pressed in the current but wasn't pressed in the previous frame.
Here's a table that summarizes the ID's to interrogate:
Action | P1 ID | P2 ID | P3 ID | P4 ID |
---|---|---|---|---|
Up | 0 | 8 | 16 | 24 |
Down | 1 | 9 | 17 | 25 |
Left | 2 | 10 | 18 | 26 |
Right | 3 | 11 | 19 | 27 |
A | 4 | 12 | 20 | 28 |
B | 5 | 13 | 21 | 29 |
X | 6 | 14 | 22 | 30 |
Y | 7 | 15 | 23 | 31 |
Note: Specifying any button index below 0 or above 31 will wrap around the value consecutively.
The default keymapping for Player 1 is:
Action | Key (QWERTY) |
---|---|
Up | Up Arrow |
Down | Down Arrow |
Left | Left Arrow |
Right | Right Arrow |
A | Z |
B | X |
X | A |
Y | S |
Note: The Android version of TIC-80 only has access to the first game pad. It ignores key bindings and places virtual buttons on the screen. Any TIC-80 programs that use key bindings as the basis must be what is in the table above.
TIC-80 tiny computer https://tic80.com | Twitter | Telegram | Terms
Built-in Editors
Console
Platform
RAM & VRAM | Display | Palette | Bits per Pixel (BPP) |
.tic
Format | Supported Languages
Other
Tutorials | Code Snippets | Libraries | External Tools | FFT
API
- BDR (0.90)
- BOOT (1.0)
- MENU
- OVR (deprecated)
- SCN (deprecated)
- TIC
- btn & btnp
- circ & circb
- clip
- cls
- elli & ellib (0.90)
- exit
- fget & fset (0.80)
- font
- key & keyp
- line
- map
- memcpy & memset
- mget & mset
- mouse
- music
- peek, peek4
- peek1, peek2 (1.0)
- pix
- pmem
- poke, poke4
- poke1, poke2 (1.0)
- rect & rectb
- reset
- sfx
- spr
- sync
- ttri (1.0)
- time
- trace
- tri & trib (0.90)
- tstamp (0.80)
- vbank (1.0)