VOGONS


First post, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

This may be also good for the guide section or the WIKI (when I have time I'll submit this to the Wiki, I guess).
I've had some problems with my keyboard and OS X, some Dosbox keycombinations would not work regardless of what I did.
After many investigations with the help of Rhoenie and Tryton (that's ripsaw or robertmo, not sure who is named Tryton on IRC) I found that my problem was caused by two things:

1.)I was using a Logitech keyboard (cordless wave) that even though it is supposed to be mac compatible, it isn't really.
Without the Logitech software (LCC) some things do work but the moment you switch command and option (ALT) key in the OS X keyboard settings (to make the layout behave like a real mac keyboard layout) you are losing your right ALT key, since OS X assigns the left ALT key functionality to the right ALT key (this is only bad when you want to use the german keybaord layout in DOSBox -> you can't type \ anymore). Also this keyboard has one key for both Scroll Lock and Pause, no matter what I tried, I couldn't get it to work as Pause key.
Basicly the same stuff happens when you use the Logitech drivers, except for the missing right ALT key functionality some F-keys behave differently unless you explicitly tell the software to have them behave normally.
But for example F12 is assigned to be the eject key and thus not always works in DOSBox.

2.)In the end I ditched my beloved Logitech Wave keyboard (which is really a joy to write on) and switched with my gf's apple keyboard with numpad.
When I did that I found the solution to another problem, which plagued me, some F-keys were behaving differently.
Solution was to look much more closely at the OS X system control settings.
- in the keyboard settings in the tab "keyboard shortcuts" some of the DOSBox shortcuts were already given to something else. Especially the Exposé and Spaces settings grab some F-keys.

- In the Exposé and Spaces settings themselves the key F8 is setup to start Spaces (multi-desktop program), and EVEN though I had disabled Spaces alltogether it blocked the use of F8 in DOSBox. Assigning anoter key fixed that, thankfully.

(- since the Apple keyboard does have an extra eject key to the right of F12, the F12 key worked flawlessly right away in Dosbox, not like that stupid Logitech keyboard)

Note:
The Apple keyboard has no keys labeled Print Screen, Scroll lock or Pause, but some F-keys (the Apple keyboard has F1-F19) are recognized in Dosbox as those:
- F14 is Print Screen
- F15 is Scroll Lock
- F16 is Pause

Unfortunately the Pause functionality in Dosbox is not correctly working in OS X:
Alt-F16 is supposed to pause Dosbox, which works, and pressing Pause (F16) should unpause Dosbox which it doesn't 🙁

So, after messing all day yesterday with this stuff, I thought it would be better to share this here for others.

Interesting would be how the Apple Wireless Keyboard would fare, since those have no numpad and no keys F13-F19. So no scroll lock, pause or numlock key... these would all need remapping in Dosbox' mapper...

Reply 1 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++

There is one thing that is wrong here and may be a source of problems:

At the beginning mac had only keys:
f1-f12

later they added three more f keys above ins,home,pgup
f1-f12
13,14,15
http://upload.wikimedia.org/wikipedia/commons … rd_II_black.jpg

later there was one keyboard model, that was later abandoned, that moved f13 to the block of f1-13 keys, made a block of 14,15,16, and another one above the numpad: 17,18,19,eject
f1-12,f13
14,15,16
17,18,19,eject
en.wikipedia.org/wiki/File:Apple_Pro_Ke ... n_top).jpg

i guess cause of appeared incompatibilities they changed it to the currant layout:
f1-12,eject
13,14,15
16,17,18,19
http://store.apple.com/us/product/MB110LL/A?f … mco=MTA4Mzc4ODA

according to what you say, in dosbox the layout is detected this way (the incompatible way):
f1-12,f13
14,15,16
17,18,19,eject

btw - your keyboard only has 15 F keys (actually it looks the f14 is missing too, but lets leave that for now) so F16(pause in dosbox) cannot work cause you simply don't have it, so if you want to test pause key do it with your gf's keyboard.

Reply 2 of 12, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

If you need to press a key combination already captured by Mac OS X, additionally press the Fn key (bottom left), if available.

For example, the new Hercules different colors, you need to press Alt-F11 to cycle the color. If that doesn' t work, press the Fn key together with.

Klimawandel.

Reply 3 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++

btw does it help if you change in sdlmain.cpp:
if(event.key.keysym.sym==SDLK_PAUSE) {
into this:
if(event.key.keysym.sym==SDLK_p) {
(does letter p unpauses dosbox after that?)

Reply 4 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator
IIGS_User wrote:

If you need to press a key combination already captured by Mac OS X, additionally press the Fn key (bottom left), if available.

Unfortunately this is not entirely true. Because the (today) standard Apple keyboard has the F-keys mapped twice.
Special functions like decrease/increase brightness (F1/F2), Exposé (F3)... and so on. To get the normal F-keys function you need to press Fn+F-key (or you disable these special functions alltogether in the System Settings -> Keyboard -> keyboard tab -> "Keys F1, F2... use standard functions"). You then use the special functions by pressing Fn+F-key.
BUT if the F-key is mapped to something in the system settings you can't bypass this by pressing Fn+F-key (because like I wrote just now, the Fn-key just switches between special and standard function, if the standard function is mapped you can't bypass this).

btw - your keyboard only has 15 F keys (actually it looks the f14 is missing too, but lets leave that for now) so F16(pause in dosbox) cannot work cause you simply don't have it, so if you want to test pause key do it with your gf's keyboard.

To make clear what I'm talking about, there is the Logitech Keyboard Cordless Wave, closely resembling that one http://www.amazon.de/Logitech-Cordless-Deskto … 57&sr=8-2-fkmr1 (this is not the qwertz layout of the german one, but I couldn't find one right away).
and there is the Apple keyboard with numpad http://store.apple.com/de/product/MB110D/A?fn … mco=MTMzNzcyMDM

The Logitech one is the one where I only have print screen, scroll lock and nothing else. Instead of the F13 key it has the insert key up there (as can be seen on the amazon link), so it got F14, F15 but no F16 and following.

The Apple one is behaving like explained, with the problem that the pause key is not working like expected.
The Apple keyboard became mine now and the Logitech is now my gf's 😀

btw does it help if you change in sdlmain.cpp: if(event.key.keysym.sym==SDLK_PAUSE) { into this: if(event.key.keysym.sym==SDLK_p […]
Show full quote

btw does it help if you change in sdlmain.cpp:
if(event.key.keysym.sym==SDLK_PAUSE) {
into this:
if(event.key.keysym.sym==SDLK_p) {
(does letter p unpauses dosbox after that?)

Yes, letter p does unpasue Dosbox, when compiled with these changes.

Reply 5 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++
Dominus wrote:

The Logitech one is the one where I only have print screen, scroll lock and nothing else. Instead of the F13 key it has the insert key up there (as can be seen on the amazon link), so it got F14, F15 but no F16 and following.

http://www.benchmark.pl/uploads/image/wave.jpg
i see only ins, print screen,pause break, no scoll lock

And keyboards that had only three extra f keys were numbered this way:
print screen (f13), no scoll lock (f14), pause break(f15)
so you have only f13 and f15, while f14 is missing
although i think it would be rather unusual not to have f14 so i guess your keyboard is just "the first standard" with only f1-12 and no more extra mac f keys, i guess these keys are only used in windows.
Unless you say that they indeed were working like f13,14,15 in mac. 😀

Reply 6 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

On the apple keyboard, f13 is NOT print screen. At least not as SDL and Dosbox mapper recognizes. As I wrote in the first post
F14 is Print Screen
F15 is Scroll lock
F16 is Pause
(and F13 is recognized as F13 in the mapper)

On the Logitech with Logitech drivers the behaviour and layout was
F12 Eject - this made it only sometimes register as F12 in the mapper
Insert
Print Screen
Scroll lock (even though it says Pause on the key lettering).

On the Logitech WITHOUT Logitech drivers:
F12
Insert
F13
Scroll lock

So on the logitech with logitech drivers, both F13 and Pause (F16) are missing.
Without the drivers, both F14 and F16 are missing.

On the Alt key issue, with the logitech drivers you have the choice to keep the layout like on Windows: ctrl-cmd(windows key)-alt-space-alt-fn-ctrl
Or as on the Mac (as opposed to the picture you posted of the wave, my keyboard has dual markings on alt, windows key to easily see the mac layout):
Ctrl-alt(windows key)-cmd-space-cmd-fn-ctrl
You can then further customize the fn key and assign it the function of either alt,cmd,ctrl or shift. Unfortunately when you assign it alt it gets the left-alt-key function 🙁
Without the logitech drivers:
Ctrl-cmd(windows key)-alt-space-alt-NO_KEY-Ctrl
The Alt keys get recognized as left and right, the Fn key is not recognized at all (neither in the mapper, nor in OS X at all, it seems)

Edit: I added the results for the Logitech keyboard WITHOUT the drivers

Last edited by Dominus on 2010-05-18, 07:09. Edited 2 times in total.

Reply 7 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++

do these two work too for unpausing?
if(event.key.keysym.sym==SDLK_F12) {
if(event.key.keysym.sym==SDLK_F16) {

Reply 8 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

F12 does unpause, F16 does not compile.

sdlmain.cpp: In function ‘void PauseDOSBox(bool)’: sdlmain.cpp:267: error: ‘SDLK_F16’ was not declared in this scope sdlmain.cpp […]
Show full quote

sdlmain.cpp: In function ‘void PauseDOSBox(bool)’:
sdlmain.cpp:267: error: ‘SDLK_F16’ was not declared in this scope
sdlmain.cpp: In function ‘void show_warning(const char*)’:
sdlmain.cpp:1533: warning: format not a string literal and no format arguments
make[3]: *** [sdlmain.o] Error 1

Which is probably not surprising since I think SDL doesn't know about F16...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 9 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++

how about F13,14 and 15?

Reply 10 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Those work.
SDLK_F16 and upwards are not declared (or whatever the right word word is) in SDL, only up to F15.
However I found that Dolphin (Gamecube emulator) does something to declare it with

SDLK_F16 = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_F16),

Don't know if anything can be done with this.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 12, by robertmo

User metadata
Rank l33t++
Rank
l33t++

what about
SDLK_PRINT
SDLK_SCROLLOCK

Reply 12 of 12, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Those compile but do not unpause Dosbox.

(I changed the 7th post in here with the results of the logitech keyboard without the logitech drivers, btw)

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper