MAPPER_AddHandler for Ctrl-Shift-Alt-V ?

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

MAPPER_AddHandler for Ctrl-Shift-Alt-V ?

Postby emendelson » 2017-12-31 @ 14:54

I have a project that uses a paste-clipboard feature that derives from dbDOS (and which seems to be in the DOSBox-X code also). For various reasons, I've mapped it the paste-clipboard to Ctrl-Alt-F4, but I would like to map it, if possible, to Ctrl-Shift-Alt-V.

I was able to map it to Ctrl-Alt-v (not Ctrl-Alt-Shift-V) by doing this:

1. I added "MK_v" to the enum MapKeys list in mapper.h

2. In sdl_mapper.cpp, I added this to the MakeDefaultBind list:
Code: Select all
case MK_v:
key = SDLK_v;

3. I added this under "Get some Event hanlders" in sdlmain.cpp:
Code: Select all
MAPPER_AddHandler(PasteClipboard, MK_v, MMOD1 | MMOD2, "paste", "Paste Clipboard");

What I can't figure out is how to make this work only with Shift-V, not v. I've tried adding MK_lshift and MK_rshift to mapper.h and the corresponding SDLK_lshift etc. in sdl_mapper.cpp. But I can't figure out how to make the MAPPER_AddHandler use them.

Is this possible at all? Am I wasting my time trying to solve this one? Many thanks for any help.
Posts: 757
Joined: 2010-2-14 @ 02:00

Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 2 guests