is it possible to redefine the pre defined keys on a sam coupe?

Anything relating to non Sinclair computers from the 1980's, 90's or even before.
Post Reply
User avatar
777
Manic Miner
Posts: 521
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

is it possible to redefine the pre defined keys on a sam coupe?

Post by 777 »

or use key codes? ive looked into this but its incredibly confusing. using key and def keycode... i want to say reassign the ctrl 'p' key and shift to output palette instead of print or 'p' and shift to output palette for example. how do i do this?
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1

http://zxspeccy.great-site.net/
User avatar
Stefan
Manic Miner
Posts: 822
Joined: Mon Nov 13, 2017 9:51 pm
Location: Belgium
Contact:

Re: is it possible to redefine the pre defined keys on a sam coupe?

Post by Stefan »

I think some keys cannot be redefined. Starting simple:

Code: Select all

def keycode 195:palette:
Will make f3 produce palette.

Code: Select all

key 66,195
def keycode 195:palette:
Will make p produce palette, 66 is the code for the p key (see keyboard map in appendix). Add the modifier 70 for shift:

Code: Select all

key 66+70,195
def keycode 195:palette:
And shift p will produce palette, in a similar vein add the modifier 210 for cntrl:

Code: Select all

key 66+210,195
def keycode 195:palette:
Should result in cntrl p producing palette, but it does not.

I have to admit that back in the day reassigning a function key or two was more than sufficient for my needs.
User avatar
777
Manic Miner
Posts: 521
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: is it possible to redefine the pre defined keys on a sam coupe?

Post by 777 »

Stefan wrote: Thu Jun 01, 2023 2:05 pm

Should result in cntrl p producing palette, but it does not.

I have to admit that back in the day reassigning a function key or two was more than sufficient for my needs.
thank you. it does work btw by using the other ctrl key in sim coupe
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1

http://zxspeccy.great-site.net/
AndyC
Dynamite Dan
Posts: 1421
Joined: Mon Nov 13, 2017 5:12 am

Re: is it possible to redefine the pre defined keys on a sam coupe?

Post by AndyC »

777 wrote: Thu Jun 01, 2023 2:16 pm thank you. it does work btw but using the other ctrl key
A real SAM has separate CNTRL and SYMBOL keys, which I'm guessing get mapped onto alternate CTRL keys on a PC keyboard in SimCoupe.
User avatar
777
Manic Miner
Posts: 521
Joined: Fri Jun 26, 2020 11:23 am
Location: sw uk

Re: is it possible to redefine the pre defined keys on a sam coupe?

Post by 777 »

AndyC wrote: Thu Jun 01, 2023 2:18 pm A real SAM has separate CNTRL and SYMBOL keys, which I'm guessing get mapped onto alternate CTRL keys on a PC keyboard in SimCoupe.
140 maps to left ctrl on sim coupe
i started programming the spectrum when i was 8 :-

1 plot rnd*255,rnd*175
2 goto 1

http://zxspeccy.great-site.net/
Post Reply