News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_rob

Remapping the keyboard in WinAPE

Started by rob, 13:54, 11 January 22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rob


I recently came across the key translate functions in the CPC firmware and I realised they could be used to make the keyboard better match a PC keyboard. I put together this little routine which takes a list of keycodes and assigns new unshifted and shifted characters. I had to change a couple of the key assignments in WinAPE's settings to make it work so I've included my KBD file in the attached zip. My keyboard is UK layout but the values could be changed for other keyboards.


You just run it once and then you can delete it - the changes are permanently stored by the firmware until the CPC is reset. Note that this won't work if whatever program you're running messes with the translation tables or doesn't use the firmware to scan the keyboard. It works fine in BASIC anyway which was my aim.


No more typing an apostrophe when you're trying to do a call command!  :D

org #8000


ld hl,map
loop:
ld a,(hl)
or a
ret z
ld c,a
inc hl
ld b,(hl)
push hl
call #bb27
pop hl
inc hl
ld a,c
ld b,(hl)
push hl
call #bb2d
pop hl
inc hl
jp loop


map:
db 57,'3£'
db 48,'6^'
db 41,'7&'
db 40,'8*'
db 33,'9('
db 32,'0)'
db 25,'-_'
db 24,'=+'
db 26,'[{'
db 17,']}'
db 29,';:'
db 28,"'@"
db 19,'#~'
db 22,'\|'
db 0


Powered by SMFPacks Menu Editor Mod