diff --git a/src/kernal/keyboard_m65/mega65_scnkey.s b/src/kernal/keyboard_m65/mega65_scnkey.s index d8836af3..cb1f21a6 100644 --- a/src/kernal/keyboard_m65/mega65_scnkey.s +++ b/src/kernal/keyboard_m65/mega65_scnkey.s @@ -160,7 +160,7 @@ m65_scnkey_got_key: ; .Y should now contain the key offset in matrix pointed by beq m65_scnkey_try_repeat ; branch if the same key as previously sty LSTX - ; Reset key repeat counters XXX turn values into constants + ; Reset key repeat counters lda #CONFIG_KEY_DELAY sta DELAY diff --git a/src/kernal/keyboard_m65/mega65_scnkey_set_keytab.s b/src/kernal/keyboard_m65/mega65_scnkey_set_keytab.s index 2920d7d3..5881a487 100644 --- a/src/kernal/keyboard_m65/mega65_scnkey_set_keytab.s +++ b/src/kernal/keyboard_m65/mega65_scnkey_set_keytab.s @@ -10,13 +10,8 @@ m65_scnkey_set_keytab: - ; Set initial KEYTAB value - lda #kb_matrix - sta KEYTAB+1 - ; Calculate table index + lda SHFLAG asl ; multiply by 2 - keyboard matrix lookup table consists of words and #$2E ; we are interested in SHIFT, VENDOR, CTRL and CAPS LOCK keys only @@ -28,8 +23,13 @@ m65_scnkey_set_keytab: ora #$10 tax @1: + ; Set KEYTAB - ; XXX finish the implementation + ldx kb_matrix_lookup+0, x + sta KEYTAB+0 + ldx kb_matrix_lookup+1, x + sta KEYTAB+1 + ; Fall back to original routine jmp scnkey_toggle_if_needed