mirror of
https://github.com/ksherlock/itty-bitty-vtty.git
synced 2024-11-28 05:50:29 +00:00
to make life easier for emacs, backspace will send $7f instead of $08.
command-backspace will send $08 (as will Control-H). If you have an extended keyboard, delete will also send $08. (mame uses delete to toggle keyboard mode so it's not yet tested).
This commit is contained in:
parent
18daf26568
commit
1f7e3b3b4c
49
vt100.key.S
49
vt100.key.S
@ -23,6 +23,27 @@ kmUpdateMod equ %0010_0000
|
|||||||
kmOption equ %0100_0000
|
kmOption equ %0100_0000
|
||||||
kmCommand equ %1000_0000
|
kmCommand equ %1000_0000
|
||||||
|
|
||||||
|
|
||||||
|
*
|
||||||
|
* The vt100 has a delete key and a backspace key.
|
||||||
|
* delete sends 0x7f. backspace sends 0x08.
|
||||||
|
* stty is general set so 0x7f is the erase character.
|
||||||
|
* termcaps generally claim 0x08 is the backspace character.
|
||||||
|
*
|
||||||
|
* emacs, by default, thinks 0x08 ( ^H ) means you want help.
|
||||||
|
*
|
||||||
|
* so, backspace will send 0x7f. control-H or command-backspace
|
||||||
|
* will send 0x08.
|
||||||
|
|
||||||
|
*
|
||||||
|
* TODO - keys
|
||||||
|
* command-L -> local/online mode?
|
||||||
|
* command-Q -> quit
|
||||||
|
* command-K -> clear screen?
|
||||||
|
* command-R -> reset settings
|
||||||
|
*
|
||||||
|
|
||||||
|
|
||||||
dispatch
|
dispatch
|
||||||
jmp write_modem
|
jmp write_modem
|
||||||
|
|
||||||
@ -72,9 +93,9 @@ keypress ent
|
|||||||
bra :send
|
bra :send
|
||||||
|
|
||||||
:notctrl
|
:notctrl
|
||||||
cmp #$7f ; delete - special case
|
* cmp #$7f ; delete - special case
|
||||||
bne :send
|
* bne :send
|
||||||
lda #$08
|
* lda #$08
|
||||||
:send jmp dispatch
|
:send jmp dispatch
|
||||||
|
|
||||||
command ; or option
|
command ; or option
|
||||||
@ -105,7 +126,8 @@ command ; or option
|
|||||||
:MIN equ 49
|
:MIN equ 49
|
||||||
:MAX equ 52
|
:MAX equ 52
|
||||||
|
|
||||||
:bs jmp dispatch ;
|
:bs lda #$08
|
||||||
|
jmp dispatch ;
|
||||||
:lf lda #$0a
|
:lf lda #$0a
|
||||||
jmp dispatch
|
jmp dispatch
|
||||||
|
|
||||||
@ -119,19 +141,28 @@ command ; or option
|
|||||||
|
|
||||||
|
|
||||||
keypad
|
keypad
|
||||||
* todo - keypad enters honors LNM?
|
|
||||||
|
|
||||||
lda key
|
lda key
|
||||||
cmp #:MIN
|
cmp #:MIN
|
||||||
blt :rts
|
blt :rts
|
||||||
cmp #:MAX+1
|
cmp #:MAX+1
|
||||||
bcs :rts
|
bcs :other
|
||||||
sec
|
sec
|
||||||
sbc #:MIN
|
sbc #:MIN
|
||||||
asl
|
asl
|
||||||
tax
|
tax
|
||||||
jmp (:table,x)
|
jmp (:table,x)
|
||||||
|
|
||||||
|
:other
|
||||||
|
|
||||||
|
* keypad delete key ($75 aka 'u') will send as backspace ($08)
|
||||||
|
*
|
||||||
|
cmp #'u'
|
||||||
|
bne :rts
|
||||||
|
lda #$08
|
||||||
|
jmp dispatch
|
||||||
|
|
||||||
|
|
||||||
:rts rts
|
:rts rts
|
||||||
|
|
||||||
:MIN equ 13
|
:MIN equ 13
|
||||||
@ -182,9 +213,9 @@ keypad
|
|||||||
dw digit ; 7
|
dw digit ; 7
|
||||||
dw digit ; 8
|
dw digit ; 8
|
||||||
dw digit ; 9
|
dw digit ; 9
|
||||||
dw $0 ; :
|
dw :rts ; :
|
||||||
dw $0 ; ;
|
dw :rts ; ;
|
||||||
dw $0 ; <
|
dw :rts ; <
|
||||||
dw pf2 ; = PF2 -> ESC Q
|
dw pf2 ; = PF2 -> ESC Q
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user