Facepunch / sbox-issues

177 stars 12 forks source link

Add support for custom keyboard layouts #2104

Open DissolveDZN opened 2 years ago

DissolveDZN commented 2 years ago

For?

Hammer

What can't you do?

I have to switch to QWERTY whenever i am using hammer since all the keybinds are also being controlled by the layout such as walking with W,A,S,D

How would you like it to work?

i want hammer to automatically convert the keybinds or just any other way to use a custom keyboard layout

What have you tried?

I have tried to bind the keys manually but i don't see a way how to do that in Sbox. it worked using the console in HL:A's hammer

Additional context

No response

KayaDLX commented 2 years ago

A workaround for this is to directly edit the bindings in s&box files in sbox\core\tools\keybindings\shared_tool_key_bindings.txt.

        InputBinding_t { m_Context = "Camera"             m_Command = "MoveCameraForward3D"            m_Input = "Z"                },
        InputBinding_t { m_Context = "Camera"             m_Command = "MoveCameraLeft3D"                m_Input = "Q"                },
        InputBinding_t { m_Context = "Camera"             m_Command = "MoveCameraBackward3D"            m_Input = "S"                },
        InputBinding_t { m_Context = "Camera"             m_Command = "MoveCameraRight3D"                m_Input = "D"                },
        InputBinding_t { m_Context = "Camera"            m_Command = "MouseControlCamera3D_Toggle"    m_Input = "W"                },
DissolveDZN commented 2 years ago

thanks i'll use that for now I still hope they'll automate this in the future

AngryNeox commented 1 year ago

A ton of hammer editor shortcuts are unusable with a german keyboard. Using Kaya's workaround also doesn't work as binding shortctus to keys like "Ü" or "+" doesn't seem possible. I also tried to use "PLUS", "KP_PLUS" and "U_WITH_DIAERESIS" but none of these worked.

The only workaround that kind of works is changing to the english keyboard in windows itself. But in practice it's incredibly confusing as the buttons on the keyboard are not the same and having to remember a second set of "shift" buttons all by memory is not fun.

Would love to see an update for this at some point.