September 23rd, 2003

  • evan

meta keys

Keyboard shortcuts between operating systems have traditionally been a mess because everyone has different keys, but they’ve more or less stabilized now; you have ctrl, alt, and a third one. The extra key is the Windows key on Windows, the Apple/Command key on Macs, and often mapped to the Meta key on Linux running on either sort of computer.

On a reasonable computer (aka: mine :P) the position of these keys is pretty much irrelevant, because I can remap any to have the behavior of the others. In all configurations I end up with these three keys, and the only interesting question is what those keys do. Windows, traditionally lacking the third key, uses ctrl for application-level commands and alt for menus. Linux uses ctrl (and alt, but not as often) for text-editing (readline) commands, effectively preventing any application-level commands. OS X neatly sidesteps the collision by using their meta key for their applications and leaving ctrl and alt alone for the terminal.

Linux GUIs, unfortunately, seem to be following Windows, which means you’re never quite sure whether ctl+a will jump to the beginning of the current line (the traditional behavior) or highlight your entire document (from Windows; pretty universally regarded as a mistake because bumping it then typing wipes out everything). LogJam is stuck using ctl+alt+key for most of its commands (GTK even steals ctl+shift+[a-f] for Unicode characters) and that’s just awful.
  • evan

windows (in the original sense)

The reason I wrote all of that was for this observation:
The lack of a consistent ctrl/alt/whatever across applications is terribly annoying. In gnome-terminal, alt+[1-9] switches tabs, while in firebird it’s ctl+[1-9]. But I argue that both are wrong. Because Linux followed Windows, we’re left with the meta key available for an even higher level of operation: window management.

I read countless bloggers howling about what an awful idea tabbed browsing was, and how OSX’s better window-navigation keys made it useless. (I recall that OSX a key to cycle between the windows of one application, or something like that, but I can remember searching for it for a while and never finding it documented...) I agree with the spirit of those people, if not with their conclusion: the fact that people care about the difference between windows and tabs is a failure of the window manager, which really oughtn’t be something we need to worry about.

(Important note here: in most things I write, one of my assumptions is that the user knows what they’re doing. This is not the case for any reasonable/popular OS, which is why it’s slightly unfair to compare to something like OSX where issues like discoverability matter. They’re good at that; I’m worrying about something different. Much of my struggling is motivated by using my laptop, where using the mouse for anything is quite painful.)

We’re already accustomed to [something]+tab switching between windows; make that key be Meta. Now add a Meta keystroke for closing, minimizing, and moving windows, and you don’t really need the mouse any more (except for cutting and pasting, but screen even lets you do that through the keyboard). OSX already uses meta-w for window closing, and Linux/Windows occasionally [heh] use ctl-w. I use meta, and add meta-m for minimize.

Working with ion, a truly glorious window manager, even though the author’s manifesto is a bit much. In ion (after you’ve fixed the configuration), to switch between windows, you hit meta+[number]. The uninitiated might think you lose track of which number maps to which program, but it quickly becomes automatic.

So if you take that back into a normal window manager, you could use meta+[1-9] to switch between windows. But, even better: move tab management out to the window manager, like in PWM (look at the screenshots) and let meta+[1-9] switch between tabs. Now everything supports tabs if you want them to, but they’re collapsed with separate windows, just another metaphor for working with multiple windows¹.

I often think about this issue because Linux lacks a consistent model for working with multiple documents in one program. Window manager limitations prevent you from doing the windows-contained-within-windows that you see in many older MS Windows programs, but even they decided that was a bad idea and have moved to the one-window-per-document model. OSX already had one-window-per-document, but they’re trapped by legacy to keep all windows from one application contiguous within the window stacking (see the lower half of that page). Linux, of course, embraces the inconsistency we see everwhere, where some programs do multiple windows, others do tabs (GNOME’s gedit comes to mind), and others do both (most “powerful” web browsers), and never the same way.

So which do I support in LogJam? The users want tabs, not windows, while I’d prefer windows, not tabs. Doing both isn’t really harder than one, but duplicating the effort just sorta sucks.

1 You lose one thing: the “save state of my tabs” found in some web browsers. I dunno how useful that is; I never use it.
  • evan

last one, i promise

But really, all of that is looking at it too closely. I think the overlapping windows metaphor for programs isn’t very useful, with two exceptions:
  • when you’re copying/referring to something in one program while typing in another (arguably could be handled with alt-tab-style switching);
  • keeping the width of web pages / text editors small so it’s easier to read (the web is probably unfixable, but both could be addressed as simply a “width” problem in a “better” system).

I’m always thinking about ways to replace it because my screen always seems to be shrinking. Right now from the top, I have the GNOME menu bar, the firebird title bar, the firebird menu bar, the firebird address bar, the firebird bookmark bar, then the firebird tabs, and only then to I get to the actual content I was trying to read.

So many system monitors/launchers present on the screen at all times have the same effect on me as a messy room. There’s a real clarity to be found in running an app full-screen¹ (in the real sense: without title bars or toolbars or anything) that is soothing.

1: ion lets you full-screen any program with a hotkey. It’s good.