map left/right arrow keys to ^H/^U

This commit is contained in:
Greg Hewgill 2011-08-15 22:19:03 +12:00
parent b9033a459a
commit a543112ee9
1 changed files with 6 additions and 2 deletions

View File

@ -803,8 +803,12 @@ class CPU:
quit = True
if event.type == pygame.KEYDOWN:
if event.unicode:
key = ord(event.unicode)
key = ord(event.unicode) if event.unicode else 0
if event.key == pygame.K_LEFT:
key = 0x08
if event.key == pygame.K_RIGHT:
key = 0x15
if key:
if key == 0x7F:
key = 0x08
self.memory.softswitches.kbd = 0x80 + key