Might be more feasible to rewrite into a checking loop that checks against a data table instead of doing individual compare and branches.
1. makes the code smaller.
2. If your table gets larger, you run up against the 128 byte max jump on the BEQ command, forcing you to use a jump table (I found that out on my pinball program)
3. You can add more commands to the table and change the end size much more easily than keeping on adding code.
Code:
CommandTable
.DB $aa, $bb, $cc, $dd, $ee, $ff, $00 (end byte is zero marker)
TablePointer = #$00
ldy TablePointer
LOOP
jsr GetKey ; returns key in KeyPressed memloc)
lda CommandTable, TablePointer
cmp KeyPressed
beq ThisIsACommand
cmp #$00 ; end of table?
beq NoCommandfound
iny
jmp LOOP
and this will leave the command in the KeyPressed and Accumulator locations.