Novum / vkQuake

Vulkan Quake port based on QuakeSpasm
GNU General Public License v2.0
1.8k stars 220 forks source link

[feature request] option to disable capslock in game now that its bindable #547

Closed timbergeron closed 2 years ago

timbergeron commented 2 years ago

ezquake uses a keyhook for this:

https://github.com/ezQuake/ezquake-source/blob/ca25d0528def3bb915d4cfeb1380d71755b05576/vid_sdl2.c#L811 https://github.com/ezQuake/ezquake-source/blob/ca25d0528def3bb915d4cfeb1380d71755b05576/sys_win.c#L83

If one were to bind capslock, they will get unexpected results when typing in the console. better to just disable it entirely?

Novum commented 2 years ago

I'm considering just reverting the change

Novum commented 2 years ago

reverted c7054a38a61306661839b084b301ec5202f0610b

daftmugi commented 2 years ago

@Novum Hi there,

Could support please be returned for capslock? Here's the thing. The reason capslock support is important to me is that I need it so I don't feel pain in my hand. It's more ergonomic. I'd imagine that most Quake players aren't getting any younger and may need this accessibility feature in the future.

For others, it's important for competitive multiplayer. I don't think @timbergeron meant for capslock support to be removed entirely, just that capslock should not change the capslock state in the console. Maybe @timbergeron can chime in here, since he added capslock support to https://github.com/timbergeron/QSS-M/commit/f9876f75dcd16053c66d06f62a2002e72271101f after all. At least for Windows, this has been added to Ironwail https://github.com/andrei-drexler/ironwail/commit/af4adbe6f05472a97fcb5a7a4c38510b6d42dc18.

One possible source of this issue is that SDL_Scancode is used instead of SDL_Keycode, so the OS keyboard layout is not honored. The player is stuck and depends on the game engine. I know SDL_Keycode honors keyboard layouts, but I don't know if it is the right choice here.

Thank you for your reconsideration!

Novum commented 2 years ago

It caused other bugs and was super low priority, so no.

daftmugi commented 2 years ago

@Novum Which bugs?

Novum commented 2 years ago

This one for example.

daftmugi commented 2 years ago

@Novum If this issue is considered a bug, it has not been fixed yet. The player can still press the capslock key and type all caps into the console. It has nothing to do with capslock being bindable or not.

So, which bugs are caused by a bindable capslock key?

timbergeron commented 2 years ago

I added ironwail's caps intercept and it works well https://github.com/timbergeron/QSS-M/commit/55f0aed670286777a8ee147d46cc7597ba95470a