While editing in an input field, I’m so used to going for Ctrl+W instead of Ctrl+Backspace because it’s more ergonomic. But almost all modern browsers use Ctrl + W to close tabs. Since when was this a convention? I’d love to go back in time and git revert this change. Incredibly frustrating.

TL;DR: old man yelling at clouds.

      • buckykat@lemmy.fmhy.ml
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Doesn’t your browser warn you about closing a tab with an active text input field in it? I get an “information you’ve entered may not be saved” popup.

          • jaykstah@waveform.social
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            Hmm just tested cause I was curious. I guess it depends on the site?

            Firefox and chromium still prompted me with “are you sure” using CTRL+W on gmail and lemmy but closed without confirmation on Twitter

  • cerement@slrpnk.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    (context – from the early days of MacOS, Cmd-W was close window – Windows and Linux remapped Cmd to Ctrl (instead of Super) when copying a lot of the keyboard shortcuts)

  • Square Singer@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Pull the W-key from your keyboard.

    Realistically, how often do you even use the W-key? It’s practically useless as is.

    (just for completenes sake: /s)

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I used to have that problem with Ctrl + Q and Ctrl + Shift + W. I used AutoKey to map them to an empty AutoKey phrase.

    You can also map Ctrl + W to an AutoKey script that converts it to Ctrl + Backspace:
    keyboard.send_keys("<ctrl>+<backspace>")

    The difference between phrases and scripts in AutoKey is that phrases can only output dumb text (and expand some macros), whereas scripts are Python code that can do stuff with the keyboard, mouse, windows etc.

    AutoKey lets you target only specific types of windows if you want, so you can additionally limit these mappings only to the browser.

  • stravanasu@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    I solved that and much more with Xremap. It’s really fantastic, fast, lightweight, and takes precedence over the key scanning of all programs. It handles also program-dependent keybindings. I managed to have Emacs-like keybindings for the whole desktop, but you could just use it to disable or remap C-w for some programs.