Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bindings work with physical keys instead to be layout independent #606

Open
anygoodname opened this issue Aug 29, 2021 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@anygoodname
Copy link

Hello,

there is an issue with CET overlay hotkey set to ` character/button and English UK language keyboard layout.
For whatever reason this key results in a different virtual key id recorded by the CET than other languages mapping this character to the same physical button.
This makes the CET overlay inaccessible on switching keyboard languages to/from English UK.
I can reproduce the issue every time I try.
Please check the tests description bellow for more details.

Kind regards.
Anygoodname.

CET keyboard ` hotkey multilanguage tests.

My setup:

  • standard HP physical keyboard English US
  • Windows 10 English US install
  • additional languages installed:
    English UK
    Greek
    Polish
  • Cyberpunk game v1.3 from GOG
  • CET v1.6.2

All the languages keyboard layouts map ` character to the same physical keyboard key: left to 1 and above TAB keys.
Left most in the digits/symbols and the backspace keys row on the HP keyboard.

Test prerequisite: clean install CET (no user settings, no mods)

Test #1:

new bind ` key as CET overlay hot key and verify recorded key id.

With keyboard languages mapping the character to the same physical button: - start the game and wait for the CET to come up asking to bind its overlay key, - click BIND and press button,
- exit CET console with the newly binded hotkey,
- quit the game,
- check ...\Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\bindings.json file for the recorded key id,
- delete all json files in ...\Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\ folder,
- switch to the next keyboard language,
- repeat the above steps till the last keyboard layout checked.

Test #1 results:

1 test English US keyboard language:

"cet.overlay_key": 54043195528445952

2 test English UK keyboard language:

"cet.overlay_key": 62768919806476288

3 test Greek keyboard language:

"cet.overlay_key": 54043195528445952

4 test Polish keyboard language:

"cet.overlay_key": 54043195528445952

Test #2:

switch keyboard language and rebind ` hotkey while the CET is running.

With CET overlay hotkey set to in one keyboard language: - start the game, - open the CET console with the hotkey, - go to Bindings>Hotkeys tab, - change the keyboard layout to the next language, - rebind the Overlay hotkey to key again,
- check if it works by hiding and invoking the CET overlay with the remapped key.

Test #1 results:

1 English US > English UK

  • it is not possible to bind ` key. On key press CET shows: Overlay key: UNKNOWN
  • it is possible to bind it to some other key. E.g. 1
  • with hotkey set to 1 hiding/invoking CET overlay works as expected

2 English UK > Greek

  • ` key rebind works as expected

3 Greek > Polish

  • ` key rebind works as expected

4 Polish > English US

  • ` key rebind works as expected
@maximegmd
Copy link
Owner

This is the intended behaviour, we map virtual keys, not mapped keys.

@WSSDude
Copy link
Collaborator

WSSDude commented Aug 29, 2021

We probably could do it on physical keys though I suppose... I sent him here to create the issue.

@WSSDude
Copy link
Collaborator

WSSDude commented Aug 29, 2021

I think I'll have a look at this at some point if you won't mind... Will keep it as backlog item... Should not be impossible to do and it may be better for cases like these.

@WSSDude WSSDude reopened this Aug 29, 2021
@WSSDude WSSDude changed the title CET overlay ` hotkey not working when switching to/from English UK language keyboard Make bindings work with physical keys instead to be layout independent Aug 29, 2021
@WSSDude WSSDude added the enhancement New feature or request label Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants