DOSBox Keyboard Types the Wrong Characters — In Plain Words
], the colon as >, and you may not be able to type \ or : at all — which also means you cannot type drive letters or mount paths. The DOSBox manual’s own answer gives five fixes; the lasting one is loading your layout with the KEYB command. All five, plus the keymapper workaround for one stubborn key, are below in the manual’s order.
Honest labels, up front. Every fix on this page is copied from the DOSBox manual or the DOSBox Wiki’s own FAQ — the sources are in the Sources box, and where the two give different answers for the same symptom, both are printed and labeled. None of these fixes has been tested on a machine for this page: the DisBox settings collection this page belongs to holds 0 settings verified by actual play.
These settings live in the DisBox collection. DisBox OS — the system being built to run games with settings like these — is in the works; its interface comes first, so there is no finished OS to download yet.
Why it happens
The manual’s FAQ entry “I can’t type \ or : in DOSBox” gives the causes in one breath: “your host keyboard layout does not have a matching DOS layout representation (or it was not correctly detected), or the key mapping is wrong.” And it adds the note that explains most cases: if the host layout cannot be identified — or keyboardlayout is set to none in the configuration file — “the standard US layout is used.” On a non-US keyboard that means the printed labels and the characters DOSBox produces part company. The DOSBox Wiki’s FAQ records the same fault from the other side: “When I write : it turns out >,” and letters like å, ä and ö coming out wrong.
The manual’s five fixes
From the DOSBox manual’s keyboard answer, in its order:
- 1. Work around the two keys. “Use / instead, or ALT-58 for : and ALT-92 for \.” (Hold Alt and type the number on the numeric keypad.) Good enough to type the one command you are stuck on.
- 2. Load your layout with KEYB. This is the real fix; the next section gives it its own walkthrough. (The manual phrases it as: change the DOS keyboard layout.)
- 3. Put the commands in the configuration file instead. Anything you would type at the prompt can go in the
[autoexec]section of the configuration file, where DOSBox runs it at startup — no backslash typing required to set it up from a text editor. - 4. Flip the usescancodes setting. Open the configuration file and change the
usescancodesentry in the[sdl]section (it defaults totrue). The DOSBox Wiki’s description of the setting: it avoids the use of symkeys, and “might not work on all operating systems” — so flipping it is a legitimate test, and flipping it back costs nothing. - 5. Switch your operating system’s keyboard layout. If your OS layout and the DOS layout agree, the mismatch disappears from the other direction.
Fix 2 in full: the KEYB command
KEYB is a program built into DOSBox. Typing keyb on its own at the DOSBox prompt displays the current codepage and, if one is loaded, the keyboard layout — so you can see what DOSBox thinks you have. To load a layout, type keyb followed by the layout’s code: the manual’s examples are keyb pl214 (a Polish typists layout), keyb ru441 866 (a Russian layout with codepage 866), and keyb none 858 (a codepage with no layout). Layout codes are the DOS language codes, and many layouts and codepages are built into DOSBox already. To make the choice permanent, the same code goes in the configuration file as keyboardlayout= in the [dos] section — DOSBox’s own shipped configuration sets keyboardlayout=auto, and the manual notes that auto currently works under Windows only, choosing the language from the OS language while the keyboard layout itself is not detected. That last sentence is why so many non-US keyboards land on the US fallback in the first place.
The Wiki FAQ’s answer to the same symptom is one line — “Use the KEYB command to change your keyboard layout” — so the two official sources agree on the main fix.
Two special cases
Only the colon (and its shifted neighbours) are broken: the Wiki FAQ’s “No ‘:’ symbol” answer is “Use the left shift instead of the right shift. A number of keys are affected by this problem.” The manual has the matching entry for Windows: “Right Shift and ‘\’ doesn’t work in DOSBox” can happen when Windows thinks more than one keyboard is connected — it names remote-control devices as a cause — and gives a test (starting DOSBox with the sdl_videodriver set to windib) plus a VOGONS thread with the two lasting solutions.
One key is wrong and everything else is right: the Wiki FAQ’s “No backslash key” entry — backslash coming out as ] on Windows — calls it “usually a keyboard driver problem,” offers Windows driver fixes, and gives a keymapper workaround that works regardless: press Ctrl+F1 to open the keymapper, click the backslash key on the on-screen keyboard, press Delete, then press Add and press an unused real key to bind it, then Save and Exit. The manual’s KeyMapper section explains the idea behind it — the on-screen keys are the events DOSBox reports, and Add/Del change which real key produces each one — and notes DOSBox can be started straight into the mapper with -startmapper, which it calls “useful for people with keyboard problems.”
If the keyboard lags instead
A different symptom with its own manual entry: “The keyboard lags.” The manual’s answer is to lower the priority setting in the configuration file — its example is priority=normal,normal — and you might also lower the cycles to a fixed amount to start with, “like cycles=10000.”
The one-minute version: Wrong characters = wrong layout. Type keyb to see what is loaded; load yours with keyb plus its code, or set keyboardlayout= in the [dos] section. Stuck right now → type / instead of \, Alt+58 for :, Alt+92 for \. Colon only → use the left Shift. One stubborn key → Ctrl+F1 keymapper: select it, Delete, Add, press an unused key, Save. Still wrong → flip usescancodes in [sdl].
Sources
DOSBox (dosbox.com) — “DOSBox v0.74-3 Manual” — the FAQ answers “I can’t type \ or : in DOSBox” (the causes and the five fixes), “Right Shift and ‘\’ doesn’t work in DOSBox (Windows only)”, and “The keyboard lags”; the KEYB entry in Internal Programs; Section 7 (KeyMapper: Ctrl+F1 or -startmapper, EVENT and BIND, Add/Del/Save); and Section 8 (Keyboard Layout: keyboardlayout in [dos], the auto caveat, layout examples). https://www.dosbox.com/DOSBoxManual.html
DOSBox Wiki — “DOSBox FAQ” — the entries “No backslash key” (driver problem; the keymapper workaround steps), “Gibberish” (the KEYB answer), and “No ‘:’ symbol” (use the left shift). http://www.dosbox.com/wiki/DOSBox_FAQ
DOSBox Wiki — “Configuration:SDL” — the usescancodes description and its default (true). https://www.dosbox.com/wiki/Configuration:SDL
Checked November 7, 2026
Related guides: Lemmings Has No Sound in DOSBox? The Fix, Ultima VII in DOSBox, X-COM: UFO Defense Runs Too Fast in DOSBox? The Cycles Fix, DOSBox Fullscreen Black Screen Fix and DOSBox Mouse Too Fast? The Sensitivity Fix.