Mercurial > hg > index.cgi
changeset 21:2264569d7aca
Fix and speed up key repeat
Restore accidentally removed instruction which initiates the repeat. Also
increase the repeat rate after the initial delay.
author | William Astle <lost@l-w.ca> |
---|---|
date | Tue, 08 Nov 2022 22:29:47 -0700 |
parents | 0b3b4daa0d92 |
children | 06417341c50e |
files | src/lwbasic.s |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lwbasic.s Tue Nov 08 22:10:35 2022 -0700 +++ b/src/lwbasic.s Tue Nov 08 22:29:47 2022 -0700 @@ -34,7 +34,7 @@ console_curdel equ 10 ; delay between cursor blink cycles keyb_bufflen equ 64 ; keyboard ring buffer length keyb_repdeli equ 40 ; ticks before initial repeat (2/3 s) -keyb_repdelr equ 20 ; 3 repeats per second +keyb_repdelr equ 6 ; 10 repeats per second keyb_caps equ 0x80 ; capslock enabled keyb_alt equ 0x04 ; alt pressed keyb_ctrl equ 0x02 ; ctrl pressed @@ -606,7 +606,8 @@ bne keyb_read6 ; brif not - don't need to do anything clr keyb_curscan ; clear the current repeat bra keyb_read6 -keyb_read8 pshs d ; save current bit probe and scan code +keyb_read8 sta keyb_curscan ; set the current scan code that is repeating + pshs d ; save current bit probe and scan code ldb #keyb_repdeli ; intialize repeat delay stb keyb_repdel bsr keyb_tobuff ; decode key to buffer