Skip to content

Commit

Permalink
Merge pull request #193 from venomix666/arrowkeys
Browse files Browse the repository at this point in the history
Filtering of arrow keys in TTY-driver
  • Loading branch information
davidgiven authored Oct 18, 2024
2 parents 025e71d + 10ed7df commit 860b5ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/arch/commodore/pet.S
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,11 @@ zproc tty_conin
lda #0xff
ldx #0xff
jsr screen_getchar
; Filter out arrow keys
cmp #$80
zif_cs
lda #0
zendif
zuntil_cc

rts
Expand Down
7 changes: 6 additions & 1 deletion src/arch/nano6502/nano6502.S
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ zproc tty_conin
lda pending_key
zif_eq
tty_input_wait:
lda #IO_page_uart
lda #IO_page_uart
sta IO_page_reg
lda uart_rx_avail
beq tty_input_keyb
Expand All @@ -326,6 +326,11 @@ tty_input_keyb:
lda keyb_data_avail
beq tty_input_wait
lda keyb_data
; Filter out arrow keys
cmp #$80
zif_cs
lda #0
zendif
clc
rts
zendif
Expand Down
6 changes: 6 additions & 0 deletions src/arch/oric/oric.S
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ zproc tty_const
zendif

lda pending_key

zif_ne
lda #0xff
zendif
Expand All @@ -704,6 +705,11 @@ zproc tty_conin
lda #0xff
ldx #0xff
jsr screen_getchar
; Filter out arrow keys
cmp #$80
zif_cs
lda #0
zendif
zuntil_cc

rts
Expand Down

0 comments on commit 860b5ef

Please sign in to comment.