How to not change the binding display nor the inputs while changing to languages in the new input system?

My native language does not use the Latin script(a,b,c) but a completely different set of letters, I want for the inputs to not change(if the input is the letter A by using by character mapped to key, then there’s a problem because there is no letter A on my native’s languages keyboard layout.)

If the input is the key A, then in English the input will be the letter A, and in my language it is ש, which the display will change to, which looks very out of place in my game, and the costume font I’m using does not even support it so it will just disappear.

In conclusion:

By location of key:

  • changes the display

  • does not change the inputs.

By character mapped to key

  • (mostly) does not change the display (except that it adds quotation marks)

  • changes the inputs

What I want:

  • don’t change the display
  • don’t change the inputs

In other words: completely ignore the language change.

*The final part is a combination of the two, and I don’t know how to achieve that.

Hey, they cant even sort UK and US keyboards out so it will say ` and its not, or " and its not.. so.. I wouldnt hold your breath

Using the keyboard-layout specific name of the key as reported by the operating system makes the most sense as the default. The way you want things to work will break on layouts that do have latin keys in non-QWERT locations. E.g. you’d display “A” for the key next to caps-lock but on a French keyboard “A” is the key above, next to the tab key.

You could check if KeyControl.displayName (keyboard-layout specific name) is non-latin and use KeyControl.name (QWERT-based name) instead in those cases, hoping users of all non-latin languages will know where the QWERT-equivalent keys are located on their keyboard.

@bugfinders That’s displayName not showing the right key? I’m pretty sure that’s reported by the operating system and should match the keyboard layout you have selected.

nope it doesnt, not in any untiy game Ive played.

it will say press ` for whatever.. and no, its not `… you press ~ and it marks it as ` cos its a US format keyboard on a very much UK only system

What keyboard layout are you using exactly? From what I can tell, ~ (tilde) is usually on the # (hash) key for UK layouts, next to the return key? But if ` (backtick) and ~ (tilde) get confused, that would point more to the US layout where those are on the key left to the 1-key on the numbers row?

I’m referencing the UK regular / extended layouts here:

So, Ive seen it in so many games now. but yes, # or ~ is one key, and yet the key will show ` on the game.

So, heres my keyboard (yes it needs cleaning, constantly)

now, of course, the location of the keys isnt the key (haha) but the mapping it has is, and under normal use all those keys function as expectd. However many games use ` for actions like run, (note just to be awkward technically this is a TKL so i dont have a keypad, but this doesnt actually change anything relevant to the conversation)

Ive seen a number of games where it would say ` is the key, but, pressing it or # did not hellp, even remapping it to ` thinking oh well it obviously thinks its something else.. doesnt work :stuck_out_tongue:

At least with the new Input System, this seems to work as expected for me. It’s the backslashKey and its display name changes depending on the keyboard layout I choose: \ for US, # for UK and $ for my default Swiss-German layout.

I solved it:

I used By Location of Key, but hijacked the UpdateBindingDisplay() function in the RebindActionUI. I took the path of the input as a string, and removed the “/” part at the beginning.

I know this is bad practice, and it won’t work on different controllers, but it works for my needs. This only works if your game supports only one language, and one input controller.