this post was submitted on 06 Jul 2023
42 points (97.7% liked)

Linux

48145 readers
792 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

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.

top 25 comments
sorted by: hot top controversial new old
[–] OptimusPrime@lemmy.moonling.nl 17 points 1 year ago* (last edited 1 year ago) (1 children)

CTRL + SHIFT + T (multiple times if needed) will reopen the last closed tab.

Problem solved

[–] lckdscl@whiskers.bim.boats 7 points 1 year ago (1 children)

I know, but this happens only when editing text. Tab closed = text gone.

[–] buckykat@lemmy.fmhy.ml 6 points 1 year ago (2 children)

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.

[–] OptimusPrime@lemmy.moonling.nl 3 points 1 year ago (2 children)

Not with CTRL + W

It “force closes” the tab. Correct me if I’m wrong.

[–] jaykstah@waveform.social 3 points 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

[–] buckykat@lemmy.fmhy.ml 1 points 1 year ago

I get the same warning popup behavior closing the tab with the mouse or with ctrl-w

[–] cnqr@beehaw.org 1 points 1 year ago

It needs to be an active form, text field is not sufficient.

Pretty sure that's been the shortcut since Mozilla Phoenix (now Firefox) introduced tabs in 2002 or so.

[–] OnionFutures@vlemmy.net 8 points 1 year ago (2 children)

Doesn't your browser warn you before closing a tab where you have entered text in an input field?

[–] NekkoDroid@programming.dev 2 points 1 year ago

I am not entirely sure, but I think it depends on the page if it warns if text is in an input and you want to leave the page.

[–] lckdscl@whiskers.bim.boats 1 points 1 year ago

Yes, but that's not always the case. For example, I use Portainer to drop into the shell of my Docker containers with a "terminal UI" and that tricks me into using Ctrl + W.

[–] luthis@lemmy.nz 6 points 1 year ago

I don't think I've realised before that terminal word delete is also tab delete in browsers..

[–] pglpm@lemmy.ca 5 points 1 year ago* (last edited 1 year ago) (1 children)

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 C-w for some programs.

[–] lckdscl@whiskers.bim.boats 2 points 1 year ago

Thanks for the suggestion with xremap. I knew some X utils would fix this. GTK (so for some browsers) has an Emacs mode out of the box; I used to use it, but C-w was still being overridden.

[–] squaresinger@feddit.de 5 points 1 year ago (1 children)

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)

[–] elxeno@lemm.ee 2 points 1 year ago

Yeah, just use vv instead.

[–] angrymouse@lemmy.world 3 points 1 year ago* (last edited 1 year ago) (1 children)

29 years here, get my first computer in 2011 after using it sometimes in my sister's house. Never used ctrl+backspace in my life and did not know it existed. Edit maybe you can try something like that? https://addons.mozilla.org/en-US/firefox/addon/shortkeys/

[–] ccryx@discuss.tchncs.de 2 points 1 year ago (1 children)

There's also Ctrl+delete which deletes the word after the cursor.

[–] angrymouse@lemmy.world 1 points 1 year ago

Dude stop blowing my mind

[–] Ashiette@lemmy.blahaj.zone 2 points 1 year ago

vim has got to you... There's no going back.

[–] lemmyvore@feddit.nl 2 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] lckdscl@whiskers.bim.boats 0 points 1 year ago (1 children)

I'll check it out, but hope it doesn't affect performance. Thanks!

[–] lemmyvore@feddit.nl 1 points 1 year ago

I'm using AutoKey scripts like that in some games to automate weird key combinations and it has a very good response time. If it's responsive enough for a game it will probably work for text editing.

[–] cerement@slrpnk.net 1 points 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)

[–] bookworm@feddit.nl 1 points 1 year ago

Depending on your desktop environment you can probably overwrite what that keyboard combination does to prevent that from happening.

load more comments
view more: next ›