Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering of arrow keys in TTY-driver #193

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading