Sphinx and the Cursed Mummy

Sphinx and the Cursed Mummy

View Stats:
✪ Etern1tY Jan 30, 2018 @ 8:08am
Keyboard Layout
I want to remap controls by sphinx.ini file. But there's a main problem that i don't know default names of keyboard. Can i get any example for remapping ?
Originally posted by Swyter:
To use those keyboard codes you need to open your Sphinx.ini configuration file with a plain text editor like Notepad:
  • Windows: %appdata%\Sphinx\Sphinx.ini
  • macOS: ~/Library/Application Support/Sphinx/Sphinx.ini
  • Linux: ~/.local/share/Sphinx/Sphinx.ini

Just paste this at the end of the file:
#= You can override the default keyboard map of our SDL Gamepad back-end here by #= adding an EngineX keyboard code to a Xbox-style gamepad button entry. #= #= The EXKey numeric values are in EXKeyboard.h. Put them in decimal. #= This is probably a temporary thing. [PCKeyboardMap] SDL_CONTROLLER_BUTTON_A=44 # 0x2c / EXKey::SPC (Space bar) SDL_CONTROLLER_BUTTON_B=9 # 0x09 / EXKey::F (f,F) #SDL_CONTROLLER_BUTTON_B=19 # 0x13 / EXKey::P (p,P) SDL_CONTROLLER_BUTTON_X=43 # 0x2b / EXKey::TAB (Tab key) SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key) SDL_CONTROLLER_BUTTON_BACK=42 # 0x2a / EXKey::BKSP (Backspace) SDL_CONTROLLER_BUTTON_START=40 # 0x28 / EXKey::ENT (Enter key) SDL_CONTROLLER_BUTTON_LEFTSTICK=29 # 0x1d / EXKey::Z (z,Z) SDL_CONTROLLER_BUTTON_RIGHTSTICK=6 # 0x06 / EXKey::C (c,C) SDL_CONTROLLER_BUTTON_LEFTSHOULDER=20 # 0x14 / EXKey::Q (q,Q) SDL_CONTROLLER_BUTTON_RIGHTSHOULDER=8 # 0x08 / EXKey::E (e,E) SDL_CONTROLLER_BUTTON_DPAD_UP=82 # 0x52 / EXKey::UP (Up arrow) SDL_CONTROLLER_BUTTON_DPAD_DOWN=81 # 0x51 / EXKey::DOWN (Down arrow) SDL_CONTROLLER_BUTTON_DPAD_LEFT=80 # 0x50 / EXKey::LEFT (Left arrow) SDL_CONTROLLER_BUTTON_DPAD_RIGHT=79 # 0x4f / EXKey::RIGHT (Right arrow)

Let's say that we want to remap the Y button (for your shield) from Esc to Capslock. You can see in the table above that the code for Capslock is 57, you can also see that 41 is the code for Esc.

Just replace that...
SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key)

...by this:
SDL_CONTROLLER_BUTTON_Y=57

Then save the file, you can close it now. The key should be remapped the next time you launch the game, but keep in mind that the left-analog stick is hardcoded to WASD and the right-analog stick to the mouse at the moment. This is a temporary keyboard mapping mechanism that will get replaced soon.

Hope that helps!
< >
Showing 1-15 of 16 comments
Swyter  [developer] Jan 30, 2018 @ 9:43am 
This is the list of keys and their numeric codes:
  • Alphabetic keys:
    • A:  4   (a, A)
    • B:  5   (b, B)
    • C:  6   (c, C)
    • D:  7   (d, D)
    • E:  8   (e, E)
    • F:  9   (f, F)
    • G: 10   (g, G)
    • H: 11   (h, H)
    • I: 12   (i, I)
    • J: 13   (j, J)
    • K: 14   (k, K)
    • L: 15   (l, L)
    • M: 16   (m, M)
    • N: 17   (n, N)
    • O: 18   (o, O)
    • P: 19   (p, P)
    • Q: 20   (q, Q)
    • R: 21   (r, R)
    • S: 22   (s, S)
    • T: 23   (t, T)
    • U: 24   (u, U)
    • V: 25   (v, V)
    • W: 26   (w, W)
    • X: 27   (x, X)
    • Y: 28   (y, Y)
    • Z: 29   (z, Z)

  • Number keys - main keypad:
    • M1: 30   (1)
    • M2: 31   (2)
    • M3: 32   (3)
    • M4: 33   (4)
    • M5: 34   (5)
    • M6: 35   (6)
    • M7: 36   (7)
    • M8: 37   (8)
    • M9: 38   (9)
    • M0: 39   (0)

  • Bit's n bobs:
    • ENT: 40   (Enter key on num pad)
    • RET: 40   (Return key on main keypad)
    • ESC: 41   (Escape key)
    • BKSP: 42   (Backspace)
    • TAB: 43   (Tab key)
    • SPC: 44   (Space bar)
    • DASH: 45   (- and _)
    • EQL: 46   (: and +)
    • LBRC: 47   ([ and {)
    • RBRC: 48   (] and })
    • HASH: 50   (# and ~)
    • SEMIC: 51   ( and :)
    • QUOTE: 52   (' and @)
    • GRAVE: 53   (` and ¬)
    • COMMA: 54   (, and <)
    • DOT: 55   (. and >)
    • SLASH: 56   (/ and ?)
    • CAPS: 57   (Caps-lock key)

  • Function Keys:
    • F1: 58   (F1)
    • F2: 59   (F3)
    • F3: 60   (F3)
    • F4: 61   (F4)
    • F5: 62   (F5)
    • F6: 63   (F6)
    • F7: 64   (F7)
    • F8: 65   (F8)
    • F9: 66   (F9)
    • F10: 67   (F10)
    • F11: 68   (F11)
    • F12: 69   (F12)

  • Arrow Keys:
    • RIGHT: 79   (Right arrow)
    • LEFT: 80   (Left arrow)
    • DOWN: 81   (Down arrow)
    • UP: 82   (Up arrow)

  • Numeric Keypad:
    • NLK: 83   (Numlock)
    • NDIV: 84   (Numpad divide)
    • NMUL: 85   (Numpad multiply)
    • NSUB: 86   (Numpad subtract)
    • NADD: 87   (Numpad add)
    • NENT: 88   (Enter key)
    • N1: 89   (Numpad 1)
    • N2: 90   (Numpad 2)
    • N3: 91   (Numpad 3)
    • N4: 92   (Numpad 4)
    • N5: 93   (Numpad 5)
    • N6: 94   (Numpad 6)
    • N7: 95   (Numpad 7)
    • N8: 96   (Numpad 8)
    • N9: 97   (Numpad 9)
    • N0: 98   (Numpad 0))
    • NDOT: 99   (Numpad period '.')

  • Backslash doesn't fit anywhere properly...
    • BSLSH: 100   (\ and |)

  • Windows Key and Menu button:
    • MENU: 101

  • Modifier Keys:
    • LCTRL: 224   (Left Control key)
    • LSHIFT: 225   (Left Shift key)
    • LALT: 226   (Left Alt key)
    • LWIN: 227   (Left Windows key)
    • RCTRL: 228   (Right Control key)
    • RSHIFT: 229   (Right Shift key)
    • RALT: 230   (Right Alt key)
    • RWIN: 231   (Right Windows key)
Last edited by Swyter; Jan 30, 2018 @ 10:01am
A developer of this app has indicated that this post answers the original topic.
Swyter  [developer] Jan 30, 2018 @ 10:13am 
To use those keyboard codes you need to open your Sphinx.ini configuration file with a plain text editor like Notepad:
  • Windows: %appdata%\Sphinx\Sphinx.ini
  • macOS: ~/Library/Application Support/Sphinx/Sphinx.ini
  • Linux: ~/.local/share/Sphinx/Sphinx.ini

Just paste this at the end of the file:
#= You can override the default keyboard map of our SDL Gamepad back-end here by #= adding an EngineX keyboard code to a Xbox-style gamepad button entry. #= #= The EXKey numeric values are in EXKeyboard.h. Put them in decimal. #= This is probably a temporary thing. [PCKeyboardMap] SDL_CONTROLLER_BUTTON_A=44 # 0x2c / EXKey::SPC (Space bar) SDL_CONTROLLER_BUTTON_B=9 # 0x09 / EXKey::F (f,F) #SDL_CONTROLLER_BUTTON_B=19 # 0x13 / EXKey::P (p,P) SDL_CONTROLLER_BUTTON_X=43 # 0x2b / EXKey::TAB (Tab key) SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key) SDL_CONTROLLER_BUTTON_BACK=42 # 0x2a / EXKey::BKSP (Backspace) SDL_CONTROLLER_BUTTON_START=40 # 0x28 / EXKey::ENT (Enter key) SDL_CONTROLLER_BUTTON_LEFTSTICK=29 # 0x1d / EXKey::Z (z,Z) SDL_CONTROLLER_BUTTON_RIGHTSTICK=6 # 0x06 / EXKey::C (c,C) SDL_CONTROLLER_BUTTON_LEFTSHOULDER=20 # 0x14 / EXKey::Q (q,Q) SDL_CONTROLLER_BUTTON_RIGHTSHOULDER=8 # 0x08 / EXKey::E (e,E) SDL_CONTROLLER_BUTTON_DPAD_UP=82 # 0x52 / EXKey::UP (Up arrow) SDL_CONTROLLER_BUTTON_DPAD_DOWN=81 # 0x51 / EXKey::DOWN (Down arrow) SDL_CONTROLLER_BUTTON_DPAD_LEFT=80 # 0x50 / EXKey::LEFT (Left arrow) SDL_CONTROLLER_BUTTON_DPAD_RIGHT=79 # 0x4f / EXKey::RIGHT (Right arrow)

Let's say that we want to remap the Y button (for your shield) from Esc to Capslock. You can see in the table above that the code for Capslock is 57, you can also see that 41 is the code for Esc.

Just replace that...
SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key)

...by this:
SDL_CONTROLLER_BUTTON_Y=57

Then save the file, you can close it now. The key should be remapped the next time you launch the game, but keep in mind that the left-analog stick is hardcoded to WASD and the right-analog stick to the mouse at the moment. This is a temporary keyboard mapping mechanism that will get replaced soon.

Hope that helps!
Last edited by Swyter; Jan 30, 2018 @ 10:19am
✪ Etern1tY Jan 30, 2018 @ 11:50am 
Originally posted by Swyter:
To use those keyboard codes you need to open your Sphinx.ini configuration file with a plain text editor like Notepad:
  • Windows: %appdata%\Sphinx\Sphinx.ini
  • macOS: ~/Library/Application Support/Sphinx/Sphinx.ini
  • Linux: ~/.local/share/Sphinx/Sphinx.ini

Just paste this at the end of the file:
#= You can override the default keyboard map of our SDL Gamepad back-end here by #= adding an EngineX keyboard code to a Xbox-style gamepad button entry. #= #= The EXKey numeric values are in EXKeyboard.h. Put them in decimal. #= This is probably a temporary thing. [PCKeyboardMap] SDL_CONTROLLER_BUTTON_A=44 # 0x2c / EXKey::SPC (Space bar) SDL_CONTROLLER_BUTTON_B=9 # 0x09 / EXKey::F (f,F) #SDL_CONTROLLER_BUTTON_B=19 # 0x13 / EXKey::P (p,P) SDL_CONTROLLER_BUTTON_X=43 # 0x2b / EXKey::TAB (Tab key) SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key) SDL_CONTROLLER_BUTTON_BACK=42 # 0x2a / EXKey::BKSP (Backspace) SDL_CONTROLLER_BUTTON_START=40 # 0x28 / EXKey::ENT (Enter key) SDL_CONTROLLER_BUTTON_LEFTSTICK=29 # 0x1d / EXKey::Z (z,Z) SDL_CONTROLLER_BUTTON_RIGHTSTICK=6 # 0x06 / EXKey::C (c,C) SDL_CONTROLLER_BUTTON_LEFTSHOULDER=20 # 0x14 / EXKey::Q (q,Q) SDL_CONTROLLER_BUTTON_RIGHTSHOULDER=8 # 0x08 / EXKey::E (e,E) SDL_CONTROLLER_BUTTON_DPAD_UP=82 # 0x52 / EXKey::UP (Up arrow) SDL_CONTROLLER_BUTTON_DPAD_DOWN=81 # 0x51 / EXKey::DOWN (Down arrow) SDL_CONTROLLER_BUTTON_DPAD_LEFT=80 # 0x50 / EXKey::LEFT (Left arrow) SDL_CONTROLLER_BUTTON_DPAD_RIGHT=79 # 0x4f / EXKey::RIGHT (Right arrow)

Let's say that we want to remap the Y button (for your shield) from Esc to Capslock. You can see in the table above that the code for Capslock is 57, you can also see that 41 is the code for Esc.

Just replace that...
SDL_CONTROLLER_BUTTON_Y=41 # 0x29 / EXKey::ESC (Escape key)

...by this:
SDL_CONTROLLER_BUTTON_Y=57

Then save the file, you can close it now. The key should be remapped the next time you launch the game, but keep in mind that the left-analog stick is hardcoded to WASD and the right-analog stick to the mouse at the moment. This is a temporary keyboard mapping mechanism that will get replaced soon.

Hope that helps!
Thanks sir. Love your game <3
COMAFSOC Jan 27, 2019 @ 5:37am 
I just recently acquired this game. Is there currently a way to rebind an action to a mouse-button, for instance Controller Button X to Mouse Button 1?
Swyter  [developer] Jan 27, 2019 @ 11:40am 
Shouldn't be that hard to do, but proper rebinding (that is, without depending on the gamepad buttons) is still in the works.

Maybe I should make it progressively available; first as a config key to replace this and then expose it in menus in a latter patch (complex menus are hard to do in EngineX). Probably for the better.

Looks like there is always something more urgent that requires my attention, I know that this is a big drawback and hopefully will be fixed soon™ without approaching Valve Time.
Last edited by Swyter; Jan 27, 2019 @ 11:50am
Ras-pica Nov 28, 2019 @ 7:57pm 
Big keyword on "should". No matter what I do to the Sphinx.ini file and save it, the keys refuse to be remapped. It's driving me insane on what could possibly prevent the game from accepting the changes. I've even tried "Verify integrity of game files" in Steam launcher.

EDIT: Upon further experimentation, it seems ANYTHING I do to the file (even graphics or language changes) is rejected and the game opens with default settings. When I do "Verify integrity of game files", any modification at all will be considered a validation failure, and a new ini with all the original settings will be installed and the old ini deleted.
Last edited by Ras-pica; Nov 28, 2019 @ 8:34pm
Swyter  [developer] Nov 29, 2019 @ 2:46am 
Keep in mind that verifying integrity on Steam shouldn't reset any configuration file for Sphinx. The INI file is usually located in C:\Users\<user name>\AppData\Roaming\Sphinx\Sphinx.ini.

Maybe we should get rid of the one in the game's folder, because it often leads to confusion.
Ras-pica Nov 29, 2019 @ 1:26pm 
Originally posted by Swyter:
Keep in mind that verifying integrity on Steam shouldn't reset any configuration file for Sphinx. The INI file is usually located in C:\Users\<user name>\AppData\Roaming\Sphinx\Sphinx.ini.

Maybe we should get rid of the one in the game's folder, because it often leads to confusion.
That might be it. I've been editing the file in the wrong directory.

EDIT: Yup, it all works nicely now. I've installed the game in an alternate hard drive, so I thought the config file would also follow, but I guess it really did stick more with the Steam launcher, which was still in my C drive. Thanks!
Last edited by Ras-pica; Nov 29, 2019 @ 1:31pm
PhoneticElk Feb 1, 2023 @ 8:25am 
I'm guessing remapping to extra mouse keys is not something that would be easy to do, but it would sure be nice.
Swyter  [developer] Feb 1, 2023 @ 11:00am 
Extra mouse keys are supported after the input rewrite that's on the pipeline.
Originally posted by Swyter:
Extra mouse keys are supported after the input rewrite that's on the pipeline.
Hello, has a remapping of keys (mouse and keyboard) at long last been implemented? Via in-game menu, not editing a config file?
If not, will that ever happen? Thanks!
Swyter  [developer] Feb 13 @ 3:17am 
Hopefully it will still happen, it's one of the last few remaining things that we mentioned after release. But right now, you still can't. :steamsad:

It's close, but rewiring the whole game's input (without making it worse in some ways or losing functionality) is some all-or-nothing thing, not something you can release in chunks.
Well, more than 7 years have gone by now! I fear I won't be among the living anymore when that actually happens. :cozycastondeath:
Swyter  [developer] Feb 13 @ 4:24am 
No need to wait. I heavily recommend picking up any gamepad; even with key mapping having analog controls is always going to be superior for a game like this.

Also, the keyboard layout may look strange at first, but many players have completed the game with it many times, me included. I would like to spend more time on this, but I can only chip away at it once every few months.

It's what it is, consider anything from now an extra.
Originally posted by Swyter:
I heavily recommend picking up any gamepad; even with key mapping having analog controls is always going to be superior for a game like this.
Thanks, but won't happen. I'm a PC gamer born in 1962, and I have played this game (new version) for several hours. I did enjoy most of it, apart from the controls hassles.
I had hoped it would get some kind of full "Nightdive treatment" to actually be able finish it someday. Cheers and good luck! :cleancake:
Last edited by Nice to Have; Feb 13 @ 4:58am
< >
Showing 1-15 of 16 comments
Per page: 1530 50