The console keyboard auto detection now merges with the US def, instead of replacing it. Changed $_layout="auto" to no longer blindly trust the console keyboard when running under X. A function was borrowed from Wine which compares the X keymap with all keymaps that we have (including perhaps the console keymap) and choose the one that matches best (as there is no way to obtain scancodes from X; X terminals may not be PCs after all). Hopefully fixes bug #999831. git-svn-id: https://dosemu.svn.sourceforge.net/svnroot/dosemu/trunk@760 7758b857-130e-0410-ab9c-d8735a528d18