From 9f2488098f6c66e3fd0df48820b6956843f8ee15 Mon Sep 17 00:00:00 2001 From: dakkar Date: Tue, 15 Sep 2009 15:58:16 +0200 Subject: page about the keyboard layout --- src/SW/my-layout/document.en.rest.txt | 92 ++++++++++++++++++++++++++++++++++ src/SW/my-layout/document.it.rest.txt | 94 +++++++++++++++++++++++++++++++++++ src/SW/my-layout/du2html.xsl | 1 + src/tags/configs/base-feed.tt | 1 + src/tags/configs/document-listing.tt | 1 + src/tags/configs/document.en.rest.tt | 7 +++ src/tags/configs/document.it.rest.tt | 7 +++ src/tags/configs/du2html.xsl | 1 + src/tags/configs/feed.en.tt | 1 + src/tags/configs/feed.it.tt | 1 + src/tags/configs/fillFeed.xsl | 1 + 11 files changed, 207 insertions(+) create mode 100644 src/SW/my-layout/document.en.rest.txt create mode 100644 src/SW/my-layout/document.it.rest.txt create mode 120000 src/SW/my-layout/du2html.xsl create mode 120000 src/tags/configs/base-feed.tt create mode 120000 src/tags/configs/document-listing.tt create mode 100644 src/tags/configs/document.en.rest.tt create mode 100644 src/tags/configs/document.it.rest.tt create mode 120000 src/tags/configs/du2html.xsl create mode 100644 src/tags/configs/feed.en.tt create mode 100644 src/tags/configs/feed.it.tt create mode 120000 src/tags/configs/fillFeed.xsl diff --git a/src/SW/my-layout/document.en.rest.txt b/src/SW/my-layout/document.en.rest.txt new file mode 100644 index 0000000..2c90144 --- /dev/null +++ b/src/SW/my-layout/document.en.rest.txt @@ -0,0 +1,92 @@ +==================== + My keyboard layout +==================== +:CreationDate: 2009-09-15 13:20:11 +:Id: SW/my-layout +:tags: - keyboard + - configs + +I use a `Dvorak layout +`_, on an +`Apple Aluminum Keyboard (A1243) +`_, on a +Gentoo Linux PC. + +I could *mostly* do with the `xorg`-provided dvorak layout, by putting +this in my ``/etc/hal/fdi/policy/10-x11-input.fdi`` file:: + + + us + evdev + dvorak + + +but a few keys were wrong: the "tilde" and "section" keys were +swapped, the "fn" key was not recognized, and most function keys did +not work. + +For the "fn" key, I had to `write a bit of code +<../xf86-input-evdev/>`_, but for the rest I only had to configure +`XKB` properly. + +Now my `HAL` policy file contains:: + + + dakkar + evdev + dvorak-apple-al + 464=118 120=210 204=211 + + +and I have a ``/usr/share/X11/xkb/symbols/dakkar`` file with:: + + default partial alphanumeric_keys + xkb_symbols "dvorak-apple-al" { + + name[Group1] = "USA Dvorak Apple Aluminium keyboard"; + + include "us(dvorak)" + + key { [ quoteleft, asciitilde ] }; + + key { [ section, plusminus ] }; + + key { [ XF86MonBrightnessDown, F1, F1, XF86_Switch_VT_1 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86MonBrightnessUp, F2, F2, XF86_Switch_VT_2 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86Launch3, F3, F3, XF86_Switch_VT_3 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86Launch4, F4, F4, XF86_Switch_VT_4 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86KbdBrightnessDown, F5, F5, XF86_Switch_VT_5 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86KbdBrightnessUp, F6, F6, XF86_Switch_VT_6 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioPrev, F7, F7, XF86_Switch_VT_7 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioPlay, F8, F8, XF86_Switch_VT_8 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioNext, F9, F9, XF86_Switch_VT_9 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioMute, F10, F10, XF86_Switch_VT_10 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioLowerVolume, F11, F11, XF86_Switch_VT_11 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioRaiseVolume, F12, F12, XF86_Switch_VT_12 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F13, F13, F13, F13 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F14, F14, F14, F14 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F15, F15, F15, F15 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F16, F16, F16, F16 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F17, F17, F17, F17 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F18, F18, F18, F18 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F19, F19, F19, F19 ] , type[Group1] = "FOUR_LEVEL_X" }; + + key { [ ISO_Level3_Shift, Insert ] }; + }; + +The first two ``key`` lines swap "tilde" and "section", the rest are +more interesting. You see, on this keyboard (on a Mac, at least) "F1" +… "F18" are reached in combination with the "fn" key, and the primary +function of those keys is to be shortcuts for programs (like Exposé or +Dashboard) or commands (change screen brightness, playing track, +volume). So I made it work the same on X11. The ``FOUR_LEVEL_X`` type +defines a key that has 4 possible symbols: on its own, with +``LevelThree``, with ``Shift+LevelThree``, and with ``Control+Alt``; +since I map the "ins" (really, "fn") key to ``ISO_Level3_Shift``, I +can access the function keys in combination with "fn", I can access +the command keys on their own, and (quite important) I can still +switch to the text consoles ``:-)``. + +Oh, and ``Shift+Fn`` actually produces ``Shift+Insert``, so I can +paste from the primary selection into my terminals without reaching +for the mouse. diff --git a/src/SW/my-layout/document.it.rest.txt b/src/SW/my-layout/document.it.rest.txt new file mode 100644 index 0000000..fe59d9b --- /dev/null +++ b/src/SW/my-layout/document.it.rest.txt @@ -0,0 +1,94 @@ +=========================== + Il mio layout di tastiera +=========================== +:CreationDate: 2009-09-15 13:20:11 +:Id: SW/my-layout +:tags: - keyboard + - configs + +Io uso un `layout Dvorak +`_, su una +`tastiera Apple Alluminio (A1243) +`_, su un PC con Gentoo +Linux. + +Avrei potuto *quasi* usare il layout dvorak di serie di `xorg`, +scrivendo questo in ``/etc/hal/fdi/policy/10-x11-input.fdi``:: + + + us + evdev + dvorak + + +ma avrei avuto un po' di problemi: i tasti "tilde" e "sezione" +sarebbero stati scambiati, il tasto "fn" non sarebbe stato +riconosciuto, e la maggior parte dei tasti funzione non avrebbero +funzionato. + +Per il tasto "fn" ho dovuto `scrivere un po' di codice +<../xf86-input-evdev/>`_, ma per il resto è bastato configurare per +bene `XKB`. + +Ora il file di `HAL` contiene:: + + + dakkar + evdev + dvorak-apple-al + 464=118 120=210 204=211 + + +e ho un file ``/usr/share/X11/xkb/symbols/dakkar`` con:: + + default partial alphanumeric_keys + xkb_symbols "dvorak-apple-al" { + + name[Group1] = "USA Dvorak Apple Aluminium keyboard"; + + include "us(dvorak)" + + key { [ quoteleft, asciitilde ] }; + + key { [ section, plusminus ] }; + + key { [ XF86MonBrightnessDown, F1, F1, XF86_Switch_VT_1 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86MonBrightnessUp, F2, F2, XF86_Switch_VT_2 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86Launch3, F3, F3, XF86_Switch_VT_3 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86Launch4, F4, F4, XF86_Switch_VT_4 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86KbdBrightnessDown, F5, F5, XF86_Switch_VT_5 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86KbdBrightnessUp, F6, F6, XF86_Switch_VT_6 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioPrev, F7, F7, XF86_Switch_VT_7 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioPlay, F8, F8, XF86_Switch_VT_8 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioNext, F9, F9, XF86_Switch_VT_9 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioMute, F10, F10, XF86_Switch_VT_10 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioLowerVolume, F11, F11, XF86_Switch_VT_11 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ XF86AudioRaiseVolume, F12, F12, XF86_Switch_VT_12 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F13, F13, F13, F13 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F14, F14, F14, F14 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F15, F15, F15, F15 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F16, F16, F16, F16 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F17, F17, F17, F17 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F18, F18, F18, F18 ] , type[Group1] = "FOUR_LEVEL_X" }; + key { [ F19, F19, F19, F19 ] , type[Group1] = "FOUR_LEVEL_X" }; + + key { [ ISO_Level3_Shift, Insert ] }; + }; + +Le prime due righe "key" scambiano "tilde" e "sezione", il resto è più +interessante. Vedete, su questa tastiera (su un Mac, almeno) "F1" … +"F18" si ottengono in combinazione con il tasto "fn", e l'uso +principale (senza modificatori) di quei tasti è di invocare programmi +(Exposé o Dashboard) e altri comandi (cambiare la luminosità dello +schermo, la traccia in riproduzione, il volume). Quindi ho fatto in +modo di avere lo stesso comportamento anche su X11. Il tipo +``FOUR_LEVEL_X`` definisce un tasto che ha 4 possibili simboli: da +solo, con ``LevelThree``, con ``Shift+LevelThree``, e con +``Control+Alt``; siccome mappo il tasto "ins" (in effetti, "fn") a +``ISO_Level3_Shift``, posso accedere ai tasti funzione con "fn", posso +accedere ai tasti comando da soli, e (piuttosto importante) posso pure +passare alle console testo ``:-)``. + +Oh, e ``Shift+Fn`` produce ``Shift+Insert``, così che posso incollare +il testo dalla selezione primaria nel terminale senza prendere il +mouse. diff --git a/src/SW/my-layout/du2html.xsl b/src/SW/my-layout/du2html.xsl new file mode 120000 index 0000000..e2487e0 --- /dev/null +++ b/src/SW/my-layout/du2html.xsl @@ -0,0 +1 @@ +../../../templates/du2html.xsl \ No newline at end of file diff --git a/src/tags/configs/base-feed.tt b/src/tags/configs/base-feed.tt new file mode 120000 index 0000000..adac363 --- /dev/null +++ b/src/tags/configs/base-feed.tt @@ -0,0 +1 @@ +../../../templates/base-feed.tt \ No newline at end of file diff --git a/src/tags/configs/document-listing.tt b/src/tags/configs/document-listing.tt new file mode 120000 index 0000000..88c3968 --- /dev/null +++ b/src/tags/configs/document-listing.tt @@ -0,0 +1 @@ +../../../templates/document-listing.tt \ No newline at end of file diff --git a/src/tags/configs/document.en.rest.tt b/src/tags/configs/document.en.rest.tt new file mode 100644 index 0000000..99cb5a0 --- /dev/null +++ b/src/tags/configs/document.en.rest.tt @@ -0,0 +1,7 @@ +======================== + Various configurations +======================== +:CreationDate: 2009-09-15 13:20:11 +:feed: + +[% PROCESS 'document-listing.tt' %] diff --git a/src/tags/configs/document.it.rest.tt b/src/tags/configs/document.it.rest.tt new file mode 100644 index 0000000..be3ce70 --- /dev/null +++ b/src/tags/configs/document.it.rest.tt @@ -0,0 +1,7 @@ +====================== + Configurazioni varie +====================== +:CreationDate: 2009-09-15 13:20:11 +:feed: + +[% PROCESS 'document-listing.tt' %] diff --git a/src/tags/configs/du2html.xsl b/src/tags/configs/du2html.xsl new file mode 120000 index 0000000..e2487e0 --- /dev/null +++ b/src/tags/configs/du2html.xsl @@ -0,0 +1 @@ +../../../templates/du2html.xsl \ No newline at end of file diff --git a/src/tags/configs/feed.en.tt b/src/tags/configs/feed.en.tt new file mode 100644 index 0000000..f7b7730 --- /dev/null +++ b/src/tags/configs/feed.en.tt @@ -0,0 +1 @@ +[% INCLUDE 'base-feed.tt' %] diff --git a/src/tags/configs/feed.it.tt b/src/tags/configs/feed.it.tt new file mode 100644 index 0000000..f7b7730 --- /dev/null +++ b/src/tags/configs/feed.it.tt @@ -0,0 +1 @@ +[% INCLUDE 'base-feed.tt' %] diff --git a/src/tags/configs/fillFeed.xsl b/src/tags/configs/fillFeed.xsl new file mode 120000 index 0000000..ad8d15a --- /dev/null +++ b/src/tags/configs/fillFeed.xsl @@ -0,0 +1 @@ +../../../templates/fillFeed.xsl \ No newline at end of file -- cgit v1.2.3