VOGONS


First post, by josch

User metadata
Rank Newbie
Rank
Newbie

I have a subtle problem with the shifted keys like "!".
SDL produces the correct events, but all the keys that are not letter keys don't produces characters if pressed with Shift. On the other hand, the uppercase characters are displayed.
Can someone explain how the event translation is done?

Jochen

Reply 2 of 5, by Srecko

User metadata
Rank Member
Rank
Member

It is possible that your keyboard in OS/2 activates different dosbox keycodes than in windows version.
In windows, AFAIK dosbox picks up keys as US QWERTY, even if you have non-US keyboard and layout.
If so, it's a port issue.

Reply 3 of 5, by josch

User metadata
Rank Newbie
Rank
Newbie

Could be a platform issue, but since I really can't see through the mechanism of the mapper code, I can't decide that.
From my view point I could be a subtle dosbox bug just as well.
Moreover, I would wonder if the SDL port (nobody reported a different behaviour for it so far) behaves in a different way.
Let me repeat what's wrong. Only the letter can be shifted, the other keys can't.
In my research I noted that regardless of having pressed shift or not the letter keys return with the same SDL keycode, but the others don't. Which to me is perfectly valid for a SDL implementation.
Also remember that OS/2 runs on the same hardware a Windows or Linux.

Any suggestions?

PS: I will hack now hack my way through the Linux version too see how that behaves.

Reply 4 of 5, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Not sure if that helps you, but some codepaths
that the keys should go through are:
sdlmain.cpp: void GFX_Events() [the default: case]
sdl_mapper.cpp: class CKeyBindGroup: bool CheckEvent
sdl_mapper.cpp: class CKeyEvent: void Active
keyboard.cpp: static void KEYBOARD_SetPort60

You can use the following to check what keys the
dos inside dosbox gets:
bios_keyboard.cpp: static Bitu IRQ1_Handler

Maybe you can narrow down where something gets
wrong. If it's something that can be fixed by
changing dosbox sources you should contact the
developers.

wd

Reply 5 of 5, by josch

User metadata
Rank Newbie
Rank
Newbie

We have figured it out. The SDL porter misunderstood the key codes. Instead of reacting only when Unicode is enabled, he did it always.
So, that topic is probably closed 😉