this post was submitted on 10 Mar 2024
295 points (97.7% liked)

Firefox

18063 readers
77 users here now

A place to discuss the news and latest developments on the open-source browser Firefox

founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Max_P@lemmy.max-p.me 38 points 9 months ago* (last edited 9 months ago) (3 children)

I'd go a step further and say that applications shouldn't implement keyboard shortcuts at all. Ideally there'd be an integration with the OS where the application exposes the available commands and the default key binding.

That way the OS can provide consistent key bindings across all applications, so if you switch Ctrl+C to Meta+C, it just works, and opens up a lot of possibilities for weird accessibility setups, and also opens up room for changes to the keyboards.

It's weird enough as it is if you use dvorak or more regional ones like bépo, and it's not even a different physical keyboard it's just a key layout. We have touchscreens and virtual keyboards, adding a Ctrl and Alt key to a virtual keyboard takes space and it's kinda ridiculous when we could have a nice customization shortcuts ribbon so you have copy/paste and stuff handy. There's also voice inputs.

Input needs to be decoupled from the concept of a keyboard. Steam Input is a good step towards that for games specifically, but it would be amazing as a general system so you can comfortably use Firefox from a game controller and whatnot.

[–] Atemu@lemmy.ml 8 points 9 months ago (1 children)

dvorak or more regional ones like bépo

The way you describe it is quite genius as it'd allow the OS to automatically remap shortcuts to stay on the same physical keys when the layout is something other than qwerty by simply mapping the keys twice.

I'd like to expand your idea with virtual shortcuts for common operations. Instead of declaring C to mean copy, the applications would assign the copy operation to the "common copy key" which would then be controlled by the OS.
It'd likely be C by default but the user would be able to change it in one common place for all applications.

[–] Max_P@lemmy.max-p.me 3 points 9 months ago (1 children)

What I meant is those virtual shortcuts are all you get, at all. The application declares the shortcuts with an optional suggested key binding for it, but it's up to the OS to ultimately handle the keys and tell the application which shortcut is called for.

That's exactly what Steam Input does: the game specifies actions like "player movement", "jump", "fire", "look" and Steam just sends those values to the game. The game doesn't have to implement mouse, keyboard or controller inputs at all, Steam does it all for you. In return, the game can run with controllers we'll make 10 years from now, and the player can finally just map every single button to their liking, universally. It's so much easier to deal with when thinking of "Ok, so A is jump" rather than "So I want to press A to jump which is X in the game".

Applications shouldn't have to care about how you input stuff, it's ugly and complex, leave it to the operating environment to figure that out for you.

[–] Atemu@lemmy.ml 2 points 9 months ago* (last edited 9 months ago)

I was being unclear; I meant the optional suggested keybinding would be bound to virtual keys for common actions.

The goal of that is to rebind common actions globally. Without this, you'd have to change each application's individual "copy" action to your preferred shortcut. You'd do so in the OS rather than the app but you'd still have to do it for each app individually.

Alternatively, there could be a set of pre-defined common actions that applications would simply use rather than defining their own action. I think that's what you mean.

[–] LiveLM@lemmy.zip 5 points 9 months ago* (last edited 9 months ago)

MacOS does this. Basically any action present on an app's global menu can have a key bound to it in system settings.
Not every app exposes its menu to the system however.

[–] kevincox@lemmy.ml 3 points 9 months ago

Yeah, I've thought that in addition to regular keystrokes operating systems should provide logical events. If I press Ctrl+c don't send Ctrl+c to the application, send Copy (Maybe also with the original keystroke in case it needs to be interpreted "raw" like when using remote desktop software). We sort of have this for keyboard, there are special keys like Mute and Web Browser, but I think we should extend this system for common actions that are basically universal.