Zoom button, Dedicated Keys

Perm url with updates: http://xahlee.org/kbd/zoom_button_in_keyboard.html

Keyboard Evolution: Zoom Button, Dedicated Keys

Xah Lee, 2011-05-12

Seems odd that zoom seems important today. For example, many keyboards have a dedicated zoom button. e.g. Microsoft Natural Ergonomic Keyboard 4000Logitech Wave Keyboard. Also, Microsoft's 5 button mouses by default have the 5th button to toggle a mangnify window. On Apple computers, holding down Ctrl while scroll mouse wheel will zoom the whole screen.

Typically, in a browser or most apps, 【Ctrl++】 does zoom-in and 【Ctrl+-】 does zoom-out. Or, hold down Ctrl and scroll mouse wheel. These also works in Gimp and Inkscape. In apps where zoom is more frequently needed and page scroll is not needed, such as 3D apps (e.g. Second Life, Blender, Google Earth), mouse wheel itself does zoom. (See: Google Earth Mouse Navigation and KeysSecond Life Keyboard Shortcuts Cheatsheet.)

For average computer user, web browser is probably the app they spend 90% of their time on. Many of them don't know about the keyboard shortcuts. Even for those who knew, it's less convenient than a physical dedicated button or slider with a clear label of “Zoom”. (i myself find the zoom slider on the 4000 keyboard quite useful.) It is quite necessary to zoom when browsing webs, because there are so many different screen resolutions today that a site design often has text that's too small.

Today's convention of key combinations is really a pain. Each app has tens of key shortcuts. They are known as “shortcuts” because that's what they are, and are really convenient. But for many operations, such as copy, paste, undo, open, close, the keyboard shortcuts is really the primary method of operation. They should have dedicated keys. In some apps such as Emacs, Blender, Second Life, in practice you are required to memorize some 30 or more key combinations. It's ok for these professional uses, but for the ~15 operations that's common in all applications and are frequently used, such as Copy, Cut, Paste, Undo, Redo, Open, Close, New, Save, Zoom-in, Zoom-out, maximize window, prev/next Tab, prev/next window, we should have dedicated keys. See:

The fact that a physical zoom button appeared on many keyboards is interesting, because it means that it's a common need. Microsoft and Logitech keyboard designers are not dummies. There must be some strong indication that most people find it useful, and might become a “standard” extra key, just as multimedia keys, calculator key, web browser launch key, became common since the 2000s. Though, some of such keys have come and gone or may no longer relevant, such as Instant Messaging key, Mail key, Sleep, Wake, Log Off keys.

all ways to insert special symbols in emacs

All Ways to Insert Special Symbols in Emacs

Thanks to Uriel Frisch for $15 for purchasing my emacs tutorial. (See: donation.)

Uriel asked about how to enter accented letters with emacs. Here's some relevant articles.

On mac, you can enter accented letter with the Option key. See: Mac OS X Keyboard Viewer and Unicode. You can also change a config file so the keys type any unicode you want. See: Creating Keyboard Layout in Mac OS X. The above solutions are system-wide for the Mac.

For Windows, there's AutoHotkey and some other tools. See: Windows Programing: AutoHotkey TutorialKeyboard Layout & Key Macro tools for Windows.

For within emacs, here are also several solutions. Emacs support entering common accented letter and symbols by default. See: Emacs and Unicode Tips. Again, you can also create your custome keys to enter any unicode symbol. If you want custome symbols or keys, see:


Portishead - Glory Box

Perm url with updates: http://xahlee.org/music/glory_box.html

Portishead - Glory Box

Xah Lee, 2011-05-11

Another masochistic wail of lovelorn female — Glory Box by Portishead.

I'm so tired of playing
Playing with this bow and arrow
Gonna give my heart away
Leave it to the other girls to play
For I've been a temptress too long


Give me a reason to love you
Give me a reason to be a woman
I just wanna be a woman

From this time, unchained
We're all looking at a different picture
Through this new frame of mind
A thousand flowers could bloom
Move over and give us some room


So don't you stop being a man
Just take a little look from outside when you can
Show a little tenderness
No matter if you cry


For this is the beginning of forever and ever

It's time to move over

Video is made by Jonu, music is Glory Box from Portishead's original recording. amazon

“Portishead - Glory Box (Live at Roseland NYC)”

Portishead - Glory Box, live performance.

the usefulness of wishful-thinking as a programer

Today, when starting cygwin bash, i get:

      2 [main] bash 6324 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    527 [main] bash 6324 open_stackdumpfile: Dumping stack trace to bash.exe.sta
      4 [main] bash 6348 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    435 [main] bash 6348 open_stackdumpfile: Dumping stack trace to bash.exe.sta
      3 [main] bash 6432 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    658 [main] bash 6432 open_stackdumpfile: Dumping stack trace to bash.exe.sta
     84 [main] bash 6968 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    987 [main] bash 6968 open_stackdumpfile: Dumping stack trace to bash.exe.sta
      2 [main] bash 7028 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    656 [main] bash 7028 open_stackdumpfile: Dumping stack trace to bash.exe.sta
      3 [main] bash 6936 exception::handle: Exception: STATUS_ACCESS_VIOLATION
    814 [main] bash 6936 open_stackdumpfile: Dumping stack trace to bash.exe.sta
      3 [main] bash 6480 fork: child -1 - died waiting for longjmp before initia
lization, retry 0, exit code 0x600, errno 11
1126299 [main] bash 6196 exception::handle: Exception: STATUS_ACCESS_VIOLATION
1127161 [main] bash 6196 open_stackdumpfile: Dumping stack trace to bash.exe.sta

O, technology. What a pain in the ass. A few hours is waiting for me to suck juice out of my life. A web search on the error message turns up a few posts, all esoteric.

Luckily, after restarting Windows, the problem went away. O, the miracle of wishful-thinking.

The Complexity & Tedium of Software Engineering.


Incredible Beauty: Erika Marozsán in Gloomy Sunday

Perm url with updates: http://xahlee.org/arts/Erika_Marozsan_Gloomy_Sunday.html

Incredible Beauty: Erika Marozsán in Gloomy Sunday

Xah Lee, 2011-05-10

Discovered this incredible beauty: Erika Marozsán (b1972).

“Gloomy Sunday - Original, Hungarian Version”.

Erika Marozsán in the movie Gloomy Sunday (1999) (aka “Ein Lied von Liebe und Tod”, “Szomorú Vasárnap”). amazon

The song she sings is Gloomy Sunday. (1933)

“Gloomy Sunday” is a song composed by Hungarian pianist and composer Rezső Seress in 1933, as Vége a világnak (End of the world), with alternate Szomorú vasárnap (Hungarian pronunciation: [ˈsomoruː ˈvɒʃaːrnɒp]) (Sad Sunday) lyrics written by László Jávor. The original lyrics depicted a war-stricken Hungary and a silent prayer to God. Jávor's lyrics are a mourning to a lost lover and a pledge to commit suicide to meet said lover again in the afterlife.

The song has been sung by several singers. I first heard of it by Sarah Brightman in around 2000.

“Sinead O'Connor - Gloomy Sunday” amazon

“Heather Nova - Gloomy Sunday” amazon

“Sarah Brightman - Gloomy Sunday”. amazon


Portishead - The Rip

Perm url with updates: http://xahlee.org/music/the_rip.html

Portishead - The Rip & Roads

Xah Lee, 2011-05-09

Portishead - The Rip

The Rip (2008), is a song from Portishead of their album “Third”. A fantastic song.

The song is written by band members Geoff Barrow, Beth Gibbons, Adrian Utley. Beth is the singer.

As she walks in the room
Scented and tall
Hesitating once more
And as I take on myself
And the bitterness I felt
I realise that love flows

Wild, white horses
They will take me away
And the tenderness I feel
Will send the dark underneath
Will I follow?

Through the glory of life
I will scatter on the floor
Disappointed and sore
And in my thoughts I have bled
For the riddles I've been fed
Another lie moves over

“Portishead - The Rip” amazon

Mull over the lyrics. The song, as i discovered this week with Sleeves Rhode, has personal meanings.

So, i was chatting with Sleeves, a girl i imagined to be my love, who is unwilling or unable. We've kinda dated, spent about 4 hours or so daily chatting in Second Life for the past about 2 or 3 years.

Among our love, is Portishead's songs, in particular, we love Road and Wandering Stars. She's kinda mentally unstable. For example, she told me that when she was teen, she committed suicide (unsuccessfully) while listened to the song Roads and Gloomy Sunday repeatedly for days.

She has disappeared without a word about 6 months ago (which she is wont to do), and just re-appeared again recently, and she's been very receptive and nice to me.

The problem with our relationship is that, now and then she stings. The lyrics of this song describes my quandary.

According to itune, i've been listening to this song 205 times since yesterday's discovery.

[06:17]  Sleeves Rhode: better now?
[06:17]  Xah Toll: what u want?
[06:17]  Sleeves Rhode: I want know if you're better now
[06:18]  Xah Toll: not rly
[06:18]  Sleeves Rhode: why so upset?
[06:19]  Sleeves Rhode: if you hurry, you can dance with me
[06:26]  Sleeves Rhode: what you think you gain by acting like this?
[06:35]  Xah Toll: u abused me many times
[06:36]  Xah Toll: yesterday i put up a lot to trust u again
[06:46]  Sleeves Rhode: but you still want to be my friend. dunno why you love me so much,
[06:49]  Xah Toll: yeah sure friend, but then u needn't pull that partner promise shit
[06:50]  Xah Toll: and then tell me told flatly that you lied with smugness
[06:51]  Sleeves Rhode: you really torn up about that?
[06:51]  Xah Toll: thats really nasty, just as u made up that "you were a boy" story

You can see a picture of me and Sleeves in sl: Math in Second Life (page 2).


Here's Portishead's Roads.

“Portishead - Roads” amazon

Oh, can't anybody see,
We've got a war to fight,
Never found our way,
Regardless of what they say.

How can it feel, this wrong,
From this moment,
How can it feel, this wrong.

In the morning light,
I feel,
No more can I say,
Frozen to myself.

I got nobody on my side,
And surely that ain't right,
Surely that ain't right.


Use of Unicode Matching Brackets as Specialized Delimiters

Perm url with updates: http://xahlee.org/comp/unicode_brackets_use.html

Syntax Design: Use of Unicode Matching Brackets as Specialized Delimiters

Xah Lee, 2011-05-08

In my tech blogs, often i give instructions involving the graphical menu. For example, i'd say: it's at the menu “File▸Open”. Today i decided to use a special delimiter to indicate menu. The delimiter is the unicode 〖WHITE LENTICULAR BRACKET〗. So, the menu would be written as 〖File▸Open〗. I just spend a couple hours changing all mentions of menu on my site to use the new delimiter.

Here's a summary of my usage of special unicode brackets:

  • ANGLE BRACKET. Article title. e.g. 〈Xah's Emacs Lisp Tutorial〉.
  • DOUBLE ANGLE BRACKET. Book title. e.g. 《Basic Economics》.
  • BLACK LENTICULAR BRACKET. Key combinations. e.g. 【Ctrl+c】.
  • WHITE LENTICULAR BRACKET. Menu. e.g. 〖File▸Open〗.
  • TORTOISE SHELL BRACKET. File names, path, url. e.g. 〔~/Documents/notes.txt〕.
  • CORNER BRACKET. Computer code, or math expression. e.g. 「x = 3;」.
  • ANGLE QUOTATION MARK. A variable for computer language syntax description. e.g. function ‹parameter name› = ‹expression›.
  • DOUBLE QUOTATION MARK. Generic delimiter. e.g. “something”.

Why Are These Brackets Choosen?

There are many other brackets in unicode. (See: Matching Brackets in Unicode.) I choose these brackets and my use of them carefully. The following are the reasons, in no particular order:

  • ① It must be a fairly common character, so that most browsers, editors, fonts, or other tools can display them.
  • ② The meaning i assigned to them must be compatible with the semantics given to the char in unicode.

All the brackets i've used are common ones. The “curly quote” and ‹angle quote› are widely used in western languages. The 〈〉《》【】〖〗「」〔〕 are used daily in Chinese and Japanese. (See: Intro to Chinese Punctuation with Computer Language Syntax Perspectives.) These languages are widely used in computing in China and Japan, and they are also widely supported even in non-Asian countries.

If a font or tool has any support for unicode, these brackets are probably among the top 100 or so symbols supported.

Are the Use of These Delimiters Necessary?

Are the Use of These Delimiters Necessary? Not all, but they provide meaningful info, as visual enhancement but especially for computer processing.

For example, once you realized that the lenticular bracket 【Ctrl+x】 is a marker for computer keyboard shortcut notation, users can easily recognize all keys on the page at a glance. For a sample article with these marks, see: How To Set Emacs's User Interface to Modern Conventions.

For another example, with these markers, i can easily write a program that extract all book titles, computer keys shortcuts mentioned, program menus, or code snippets from my website articles (of few thousand files). Without these markers, the problem is non-trivial.

Here's a example of the benefit of computer recognition: suppose in my Emacs Tutorial, i want to add interactive annotation for all emacs key shortcuts mentioned in the tutorial. (emacs has few hundred key shortcuts by default) When user hovers mouse over a emacs key shortcut on the article, it should have a pop-up box indicating the associated name of the command. When keys are marked with a specific delimiter for that purpose, such as 【Ctrl+x】, a program can trivially identify all of them.

What About Using HTML Markup Instead?

HTML markup is great. It serves the same purpose. I have dithered on whether to use HTML markup instead, or by special brackets in unicode, or a mixture of both. I've experimented with that over the past 2 years. Right now, i use a mixture of both.

Here's a sample html markup snippet:

Computer code: <span class="computer_code">x = 3;</span>
Keys: <span class="keyboard_shortcut">Ctrl+c</span>
Book Title: <span class="book_title">Emacs Tutorial</span>

Here's a CSS definition that automatically makes a text colored, and also inserts the brackets for display, for any text marked up with the “code” tag:

code{color:red;font-family:"DejaVu Sans Mono",monospace}

The advantage of HTML markup is that it's a more elaborate system. For example, you can color the text, specify font, text size. You can add brackets if you want. The markup is also more precise. For example, <span class="book_title">…</span> unambiguously indicate that the enclosed text is a book title, while a text enclosed by bracket 《…》 could mean something else (just look at this page you are reading, where the text inside that bracket is not necessarily book title.)

The disadvantage is that it's much more verbose, and makes the raw source code much harder to read.

Right now, all my book titles, article titles, computer code snippet, are marked using HTML, and using CSS to add specialized brackets for visual clue.

A Finer Point: Are Delimiter Brackets Semantically Meaningful or Just for Visual Enhancement?

Suppose you use CSS. For example, a book title is wrapped up by html tag like this:

<span class="book_title">The Story Of My Life</span>

and here's CSS code to add color:


You can also add brackets:


If you want the text to be colored, you must use CSS. However, you can add the bracket in the text without relying on CSS, like this:

《<span class="book_title">The Story Of My Life</span>》

The question for me was, should the bracket be part of the text or added by CSS? Which format should i choose?

The answer depends on whether the bracket is considered just a visual enhancement, or semantically meaningful. If it's just visual enhancement, then it should be part of CSS (cascading Style Sheet), as implied by the word “style” in its name. When CSS is off, readers won't see the bracket, and it doesn't matter. However, if the bracket is considered semantically meaningful, then it should not be in CSS. That way, doesn't matter whether CSS is on or off, you still see the bracket.

There are opposing views on whether the bracket should be in text or added by CSS.

① The brackets are semantically meaningful, thus should be part of text. For example, in Chinese, book titles are enclosed by angle brackets. They are semantically meaningful. It is not just a decoration. In the same way, western text involving matched pairs: “curly quotes”, «french quote», or various brackets (paren), [square bracket], {braces}, are almost always semantically meaningful. If you remove them, it effects the text in major ways.

② A bracket in a text when the text is already marked up, is redundant. Therefore, in this view, one should add the brackets by CSS and not in the text. Even though CSS is considered for appearances, but the fact is that appearances, layout, and semantics are often intertwined in various degree. Positioning (layout), sizes, often adds subtle but non-trivial semantics to a page. In practice, probably a significant percentage of web pages would become unreadable or its meaning effected if you turn off CSS, and as a fact, probably less than 0.01% pages are ever read without CSS. The bottom line of this reasoning is that, if you use HTML/CSS tech bundle, then you shouldn't add the bracket in the text, because it's already precisely marked up. Add the bracket by CSS.

Right now i haven't decided which is “better”. More precisely, i think one way might be better than the other, if a more precise goal, purpose, is given. As for now for me, it doesn't matter much for the purpose of online articles.

As a example where it might matters, is when in defining a document using XML, or the article in HTML is a basis for printed publication that goes thru further processing. (for example, The finely printed book A New Kind of Science is based on Mathematica notebook format. (see also: Notes on A New Kind of Science.) Some books are based on HTML/CSS tech. For example, Håkon Wium Lie's book. Some books are based on unix's troff system (man pages). Then there systems expressly designed for publishing, layout, typesetting: QuarkXPress, Adobe InDesign (PageMaker), DocBook, LaTeX, etc. )