ValveSoftware / Source-1-Games

Source 1 based games such as TF2 and Counter-Strike: Source
624 stars 73 forks source link

[TF2] Remapped escape key does not register keypress #304

Open everett1992 opened 11 years ago

everett1992 commented 11 years ago

I've remapped the caps lock key to escape using xmodmap and these settings:

! Swap Escape and Caps lock
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock

While in TF2 pressing the caps lock key does nothing, but it should toggle the menu, or escape from class selection, etc.

The escape key does toggle caps lock as it should.

Both keys work as they should in SpaceChem and Kerbal Space Program, I have not tried other source games to see if the problem exists in CS:S or other games.

I have the same problem in the xfce4 window manager.

To Reproduce

  1. Create a file swap_keys
! Swap Escape and Caps lock
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
  1. Run $ xmodmap swap_keys
  2. Launch TF2 and go into a game
  3. Press the caps lock key

    System Information

RunningDroid commented 10 years ago

This issue also occurs with Portal 1 and Half-Life 2.

Just to clarify what @everett1992 said, with caps lock and escape swapped some games will "see" escape when you press caps lock(the right behavior), others "see" escape only if you press escape(which also toggles caps lock), but in TF2, Portal 1, and HL2 nothing happens when either key is pressed.

note: If you run setxkbmap -option caps:escape then caps lock should act as another escape key and escape will behave normally

Yetoo1 commented 2 years ago

@davidw-valve You're assigned to this. What's your progress on it?

djairoh commented 3 weeks ago

absolute longshot here, but has anyone managed to resolve this issue?