Source-1-Games icon indicating copy to clipboard operation
Source-1-Games copied to clipboard

[TF2] Remapped escape key does not register keypress

Open everett1992 opened this issue 12 years ago • 3 comments

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

everett1992 avatar Apr 17 '13 16:04 everett1992

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

RunningDroid avatar Jul 10 '13 19:07 RunningDroid

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

Yetoo1 avatar Jan 18 '22 04:01 Yetoo1

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

djairoh avatar Jun 10 '24 12:06 djairoh