some work on CAPS LOCK support
This commit is contained in:
1 parent
21bc00138a
commit
ddc9f10f32
7 files changed
+98
-12
No files matched your search
@@ -33,6 +33,19 @@ __kb_matrix_normal:
|
||||
!byte $00,$09,$00,$84,$10,$16,$19,$1B
|
||||
}
|
||||
|
||||
!ifdef SEGMENT_KERNAL_C {
|
||||
__kb_matrix_caps:
|
||||
!byte $14,$0D,$1D,$88,$85,$86,$87,$11
|
||||
!byte $33,$77,$61,$34,$7A,$73,$65,$00
|
||||
!byte $35,$72,$64,$36,$63,$66,$74,$78
|
||||
!byte $37,$79,$67,$38,$62,$68,$75,$76
|
||||
!byte $39,$69,$6A,$30,$6D,$6B,$6F,$6E
|
||||
!byte $2B,$70,$6C,$2D,$2E,$3A,$40,$2C
|
||||
!byte $5C,$2A,$3B,$13,$00,$3D,$5E,$2F
|
||||
!byte $31,$5F,$00,$32,$20,$00,$71,$03
|
||||
!byte $00,$09,$00,$84,$10,$16,$19,$1B
|
||||
}
|
||||
|
||||
__kb_matrix_shift:
|
||||
!byte $94,$8D,$9D,$8C,$89,$8A,$8B,$91
|
||||
!byte $23,$77,$61,$24,$7A,$73,$65,$00
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
;; #LAYOUT# STD * #TAKE
|
||||
;; #LAYOUT# X16 * #IGNORE
|
||||
;; #LAYOUT# * KERNAL_0 #TAKE
|
||||
;; #LAYOUT# M65 KERNAL_C #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
@@ -15,6 +16,8 @@
|
||||
|
||||
kb_matrix_lookup:
|
||||
|
||||
!ifndef SEGMENT_KERNAL_C {
|
||||
|
||||
!byte (__kb_matrix_normal - kb_matrix) ; %000 Normal
|
||||
!byte (__kb_matrix_shift - kb_matrix) ; %001 SHIFT
|
||||
!byte (__kb_matrix_vendor - kb_matrix) ; %010 VENDOR
|
||||
@@ -23,4 +26,30 @@ kb_matrix_lookup:
|
||||
!byte $FF ; %101 SHIFT+CTRL
|
||||
!byte $FF ; %110 VENDOR+CTRL
|
||||
!byte $FF ; %111 SHIFT+VENDOR+CTRL
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
; MEGA65 native mode - no CAPS LOCK active
|
||||
|
||||
!word __kb_matrix_normal ; %0.000 Normal
|
||||
!word __kb_matrix_shift ; %0.001 SHIFT
|
||||
!word __kb_matrix_vendor ; %0.010 VENDOR
|
||||
!word $0000 ; %0.011 SHIFT+VENDOR
|
||||
!word __kb_matrix_ctrl ; %0.100 CTRL
|
||||
!word $0000 ; %0.101 SHIFT+CTRL
|
||||
!word $0000 ; %0.110 VENDOR+CTRL
|
||||
!word $0000 ; %0.111 SHIFT+VENDOR+CTRL
|
||||
|
||||
; MEGA65 native mode - CAPS LOCK pressed
|
||||
|
||||
!word __kb_matrix_caps ; %1.000 Normal
|
||||
!word __kb_matrix_shift ; %1.001 SHIFT
|
||||
!word __kb_matrix_vendor ; %1.010 VENDOR
|
||||
!word $0000 ; %1.011 SHIFT+VENDOR
|
||||
!word __kb_matrix_ctrl ; %1.100 CTRL
|
||||
!word $0000 ; %1.101 SHIFT+CTRL
|
||||
!word $0000 ; %1.110 VENDOR+CTRL
|
||||
!word $0000 ; %1.111 SHIFT+VENDOR+CTRL
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,16 +21,14 @@ scnkey_set_keytab:
|
||||
|
||||
|
||||
; Set initial KEYTAB value
|
||||
|
||||
lda #<kb_matrix
|
||||
sta KEYTAB+0
|
||||
lda #>kb_matrix
|
||||
sta KEYTAB+1
|
||||
|
||||
; Calculate table index
|
||||
|
||||
lda SHFLAG
|
||||
and #$07 ; we are only interested in SHIFT / CTRL / VENDOR keys
|
||||
and #$07 ; we are interested in SHIFT, VENDOR and CTRL keys only
|
||||
tax
|
||||
|
||||
; Retrieve table offset
|
||||
|
||||
Reference in new issue
Block a user