diff --git a/README.keyboard-layout-handling b/README.keyboard-layout-handling new file mode 100644 index 000000000..27246bf71 --- /dev/null +++ b/README.keyboard-layout-handling @@ -0,0 +1,26 @@ + +DOSBox-X is not compatible with keyboard layouts it's not prepared for. + +The SDL1 library used in this source tree, unlike the official library, +does not attempt to hack around the issue by forcing Windows to load +the US keyboard layout for itself. + +This document serves as a guide to begin modifying the source code in +this project to add support for your keyboard layout. + +VK_* mapping in SDL1 (Windows): +- vs2015/sdl/src/video/windib/SDL_dibevents.c: DIB_InitOSKeymapPriv() + +DOSBox-X keyboard layout enum: +- include/keymap.h (DKM_*) constants +- src/gui/sdlmain.cpp KeyboardLayoutDetect(), DKM_to_string(), DKM_to_descriptive_string() +- src/gui/sdlmain_linux.cpp (if working on Linux) + +You may want to familiarize yourself with the Windows LCID for the locale +you'd like to add, as well as the VK_* scan codes generated by the keyboard +for that locale, so that SDL1 mapping can be updated properly. + +In Linux, you may want to examine the X11 server keymap table and mod map +table and look at the X11 codes visible in the mapper to determine how +to add support. +