VOGONS


First post, by jorwex

User metadata
Rank Newbie
Rank
Newbie

How do I get keys in OSX to preserve the functionality of the old dos programs that use the F1-F12 keys?

Is there some System Setting I need to change before running my programs? Or some sort of option in the conf file?

If it's an OSX setting and not a DosBox setting, is there a way to set a script that'll run when I run the program, and revert back when I'm done, so the OSX function keys will work?

Reply 1 of 4, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

On a Mac laptop try to press the fn key, additionally.

Otherwise, I think, the keys will be handled DOSBox-like in fullscreen mode.

Klimawandel.

Reply 2 of 4, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I don't have a Mac, so I am probably wrong, but ...

For an X11-based system (which I believe Mac OSX is), it is the window manager (WM) that is first notified of the event that a key is pressed. It then decides what to do with that event (the keypress). In most cases the keypress-event will be forwarded to the window that is focused (DOSBox). But if the WM has already decided that key F1 does something else, then DOSBox will never see the key-event.

So start by looking at the manual pages for your WM, perhaps also the man pages for an application called xmodmap to modify the key-mappings.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 3 of 4, by darkgamorck

User metadata
Rank Member
Rank
Member

No offense MiniMax - but that couldn't be more wrong. OS X has X11 as an accessory, but is not X11 based. It is somewhat based on the model called Display Postscript created in Nextstep, it's predecessor operating system:

http://en.wikipedia.org/wiki/Display_PostScript

Of course by predecessor, I mean what OS X was before Steve Jobs and Next Inc. sold it to Apple and eventually remade it as OS X.

Now back to the original post, this is easy to do and is explained as follows (for Leopard): Go to System Preferences -> Keyboard & Mouse. Under the keyboard "tab" there is a checkbox marked, "Use all F1, F2, etc keys as standard function keys". Check it and then close the window. This will reverse the behavior of your top level function keys - so that by default they act as function keys and you have to use the Fn key to access their special functionality.

Hope this helps.

Reply 4 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well then minimax was right.
as you have to configure your system (s windowmanager) to don't touch those keys

Water flows down the stream
How to ask questions the smart way!