From 150850554baeb2d6de124b4c3cc447a694cdc17d Mon Sep 17 00:00:00 2001 From: "Sergey V. Udaltsov" Date: Thu, 18 Jun 2009 00:35:20 +0100 Subject: Initial support for extra layouts http://bugs.freedesktop.org/show_bug.cgi?id=21466 using APL layout from http://bugs.freedesktop.org/show_bug.cgi?id=21743 --- .gitignore | 1 + configure.in | 1 + po/POTFILES.in | 1 + rules/Makefile.am | 4 +- rules/base.extras.xml.in | 16 +++ rules/base.l2_s.part | 1 + rules/base.l3_s.part | 1 + rules/base.l4_s.part | 1 + rules/base.lists.part | 1 + rules/base.ml_s.part | 1 + symbols/Makefile.am | 2 +- symbols/extras/Makefile.am | 2 + symbols/extras/apl | 296 +++++++++++++++++++++++++++++++++++++++++++++ xkbrules.am | 2 +- 14 files changed, 326 insertions(+), 4 deletions(-) create mode 100644 rules/base.extras.xml.in create mode 100644 symbols/extras/Makefile.am create mode 100644 symbols/extras/apl diff --git a/.gitignore b/.gitignore index bd5c2253..e15acf61 100644 --- a/.gitignore +++ b/.gitignore @@ -56,6 +56,7 @@ po/*.gmo po/*.pot po/messages.mo po/stamp-po +rules/base.extras.xml rules/base.xml rules/base.lst rules/base diff --git a/configure.in b/configure.in index 8dded0c4..2ab90d61 100644 --- a/configure.in +++ b/configure.in @@ -77,6 +77,7 @@ symbols/sgi_vndr/Makefile symbols/sony_vndr/Makefile symbols/sun_vndr/Makefile symbols/xfree68_vndr/Makefile +symbols/extras/Makefile types/Makefile xkeyboard-config.spec docs/Makefile diff --git a/po/POTFILES.in b/po/POTFILES.in index 8b93ba49..901d327d 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1 +1,2 @@ rules/base.xml.in +rules/base.extras.xml.in diff --git a/rules/Makefile.am b/rules/Makefile.am index 581568e7..8c72986c 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -162,7 +162,7 @@ dist_files = xkb.dtd README rules_DATA = $(rules_files) $(lst_files) $(dist_files) -xml_in_files = base.xml.in evdev.xml.in +xml_in_files = base.xml.in evdev.xml.in base.extras.xml.in xml_DATA = $(xml_in_files:.xml.in=.xml) $(srcdir)/evdev.xml.in: base.xml.in @@ -174,7 +174,7 @@ EXTRA_DIST= $(xml_in_files) xfree98 \ $(base_parts_compat_dist) \ xml2lst.pl merge.sh $(dist_files) -CLEANFILES = base base.xml base.lst evdev evdev.xml evdev.lst +CLEANFILES = base base.xml base.lst evdev evdev.xml evdev.lst base.extras.xml MAINTAINERCLEANFILES = $(srcdir)/evdev.xml.in rulesdir = $(xkb_base)/rules diff --git a/rules/base.extras.xml.in b/rules/base.extras.xml.in new file mode 100644 index 00000000..73d2bbeb --- /dev/null +++ b/rules/base.extras.xml.in @@ -0,0 +1,16 @@ + + + + + + + + apl + <_shortDescription>APL + <_description>APL + + + + + + diff --git a/rules/base.l2_s.part b/rules/base.l2_s.part index 03a7aafe..dd1825fd 100644 --- a/rules/base.l2_s.part +++ b/rules/base.l2_s.part @@ -1 +1,2 @@ + $extralayouts = +extras/%l[2]%(v[2]):2 * = +%l[2]%(v[2]):2 diff --git a/rules/base.l3_s.part b/rules/base.l3_s.part index 0947c11f..2b80547d 100644 --- a/rules/base.l3_s.part +++ b/rules/base.l3_s.part @@ -1 +1,2 @@ + $extralayouts = +extras/%l[3]%(v[3]):3 * = +%l[3]%(v[3]):3 diff --git a/rules/base.l4_s.part b/rules/base.l4_s.part index 23ccc22e..6a2268f1 100644 --- a/rules/base.l4_s.part +++ b/rules/base.l4_s.part @@ -1 +1,2 @@ + $extralayouts = +extras/%l[4]%(v[4]):4 * = +%l[4]%(v[4]):4 diff --git a/rules/base.lists.part b/rules/base.lists.part index c726a067..e8f2446c 100644 --- a/rules/base.lists.part +++ b/rules/base.lists.part @@ -92,3 +92,4 @@ ! $thinkpads = thinkpad thinkpad60 thinkpadz60 +! $extralayouts = apl diff --git a/rules/base.ml_s.part b/rules/base.ml_s.part index 7e9b2d63..036695c1 100644 --- a/rules/base.ml_s.part +++ b/rules/base.ml_s.part @@ -22,4 +22,5 @@ olpc * = olpc+%l%(v) $thinkpads br = pc+br(thinkpad) * $nonlatin = pc+us+%l%(v):2 + * $extralayouts = pc+extras/%l%(v) * * = pc+%l%(v) diff --git a/symbols/Makefile.am b/symbols/Makefile.am index d033a159..472a3992 100644 --- a/symbols/Makefile.am +++ b/symbols/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = digital_vndr fujitsu_vndr hp_vndr macintosh_vndr nec_vndr sgi_vndr sony_vndr sun_vndr xfree68_vndr +SUBDIRS = digital_vndr fujitsu_vndr hp_vndr macintosh_vndr nec_vndr sgi_vndr sony_vndr sun_vndr xfree68_vndr extras symbolsdir = $(xkb_base)/symbols dist_symbols_DATA = \ diff --git a/symbols/extras/Makefile.am b/symbols/extras/Makefile.am new file mode 100644 index 00000000..0d1793d4 --- /dev/null +++ b/symbols/extras/Makefile.am @@ -0,0 +1,2 @@ +symbolsdir = $(xkb_base)/symbols/extras +dist_symbols_DATA = apl diff --git a/symbols/extras/apl b/symbols/extras/apl new file mode 100644 index 00000000..29eafe71 --- /dev/null +++ b/symbols/extras/apl @@ -0,0 +1,296 @@ +// APL Keyboard Layouts + +// This file supports: +// - The Sharp APL for Unix (SAX) layout +// - The IBM APL2 layout +// - The Manugistics APL*PLUS II (Version 5.1, 1993) keyboard layout + +// Unicode APL table: http://aplwiki.com/UnicodeAplTable +// ...and another: http://publibfp.boulder.ibm.com/epubs/pdf/h2110611.pdf (appendix A) +// Generic Unicode stuff: http://www.fileformat.info/info/unicode/category/index.htm + +// Tim Nelson (this file's creator) says: + +// This file doesn't deal with all the combining stuff -- I'm not an APL programmer, +// and am not quite sure what's needed here. However, it may be possible to get this +// working with dead keys and the like. Patches gratefully accepted. + +// Some of the shift-key assignments may differ from the APL tradition. If +// that's not considered acceptable, it should be possible to remap the +// shift keys. I have striven, however, to ensure that the use of shift keys +// in these maps is at least self-consistent. + +// I'm assuming that this will be used with another keyboard layout (ie. for +// your language), with a special shift key to use these maps. + +partial alphanumeric_keys modifier_keys +xkb_symbols "common" { + name[Group1]= "APL Keyboard Symbols: Common"; + + key { [ diaeresis ] }; + key { [ U00AF ] }; // ¯ -- Macron + key { [ less ] }; + key { [ U2264 ] }; // ≤ -- Less-than Or Equal To + key { [ equal ] }; + key { [ U2265 ] }; // ≥ -- Greater-than Or Equal To + key { [ greater ] }; + key { [ U2260 ] }; // ≠ -- Not Equal To + key { [ U2228 ] }; // ∨ -- Logical Or + key { [ U2227 ] }; // ∧ -- Logical And + + // Q + key { [ question ] }; + // W + key { [ U2375 ] }; // ⍵ -- APL Functional Symbol Omega + // E + key { [ U220A ] }; // ∊ -- Small Element Of + // R + key { [ U2374 ] }; // ⍴ -- APL Functional Symbol Rho + // T + key { [ asciitilde ] }; + // Y + key { [ U2191 ] }; // ↑ -- Upwards Arrow + // U + key { [ U2193 ] }; // ↓ -- Downwards Arrow + // I + key { [ U2373 ] }; // ⍳ -- APL Functional Symbol Iota + // O + key { [ U25CB ] }; // ○ -- White Circle + // P + key { [ U22C6 ] }; // ⋆ -- Should this be a plain asterisk, or the star operator??? + // [ + key { [ U2190 ] }; // ← -- Leftwards Arrow + + // A + key { [ U237A ] }; // ⍺ -- APL Functional Symbol Alpha + // S + key { [ U2308 ] }; // ⌈ -- Left Ceiling + // D + key { [ U230A ] }; // ⌊ -- Left Floor + // F + key { [ underscore ] }; + // G + key { [ U2207 ] }; // ∇ -- Nabla + // H + key { [ U2206 ] }; // ∆ -- Increment + // J + key { [ U2218 ] }; // ∘ -- Ring Operator + // K + key { [ apostrophe ] }; + // L + key { [ U2395 ] }; // ⎕ -- APL Functional Symbol Quad + + // Z + key { [ U2282 ] }; // ⊂ -- Subset Of + // X + key { [ U2283 ] }; // ⊃ -- Superset Of + // C + key { [ U2229 ] }; // ∩ -- Intersection + // V + key { [ U222A ] }; // ∪ -- Union + // B + key { [ U22A5 ] }; // ⊥ -- Up Tack + // N + key { [ U22A4 ] }; // ⊤ -- Down Tack + // M + key { [ U007C ] }; // | -- Vertical Line +}; + +// Keys common to a number of keyboards that allow normal language usage alongside APL +partial alphanumeric_keys modifier_keys +xkb_symbols "unified" { + name[Group1]= "APL Keyboard Symbols: Unified Layout"; + + include "apl(common)" + + // ` + key { [ U22C4 ] }; // ⋄ -- Diamond Operator + key { [ NoSymbol, U2371 ] }; // ⍱ -- APL Functional Symbol Down Caret Tilde + key { [ NoSymbol, U2372 ] }; // ⍲ -- APL Functional Symbol Up Caret Tilde + // - + key { [ U00D7 ] }; // × -- Multiplication Sign + // = + key { [ U00F7, U2339 ] }; // ÷ ⌹ -- Division Sign / APL Functional Symbol Quad Divide + + // ] + key { [ U2192 ] }; // → -- Rightwards Arrow +}; + +// Layout: http://www.wickensonline.co.uk/apl-unicomp.html +default +partial alphanumeric_keys modifier_keys +xkb_symbols "sax" { + name[Group1]= "APL Keyboard Symbols: Sharp APL for Unix"; + + include "apl(unified)" + + key { [ NoSymbol, U00A1 ] }; // ¡ -- Inverted Exclamation Mark + key { [ NoSymbol, cent ] }; + key { [ NoSymbol, U2342 ] }; // ⍂ -- APL Functional Symbol Quad Backslash + // - + key { [ NoSymbol, U2261 ] }; // ≡ -- Identical To + + // Q + key { [ NoSymbol, U00BF ] }; // ¿ -- Inverted Question Mark + // W + key { [ NoSymbol, U233D ] }; // ⌽ -- APL Functional Symbol Circle Stile + // E + key { [ NoSymbol, U2377 ] }; // ⍷ -- APL Functional Symbol Epsilon Underbar + // T + key { [ NoSymbol, U2349 ] }; // ⍉ -- APL Functional Symbol Circle Backslash + // I + key { [ NoSymbol, U2378 ] }; // ⍸ -- APL Functional Symbol Iota Underbar + // O + key { [ NoSymbol, U2365 ] }; // ⍥ -- APL Functional Symbol Circle Diaeresis + // P + key { [ NoSymbol, U235F ] }; // ⍟ -- APL Functional Symbol Circle Star + + // A + key { [ NoSymbol, U2296 ] }; // ⊖ -- Circled Minus + // F + key { [ NoSymbol, U236B ] }; // ⍫ -- APL Functional Symbol Del Tilde + // G + key { [ NoSymbol, U2352 ] }; // ∇ ⍒ -- APL Functional Symbol Del Stile + // H + key { [ NoSymbol, U234B ] }; // ∆ ⍋ -- APL Functional Symbol Delta Stile + // J + key { [ NoSymbol, U2364 ] }; // ⍤ -- APL Functional Symbol Jot Diaeresis + // K + key { [ NoSymbol, U233B ] }; // ⌻ + // L + key { [ NoSymbol, U235E ] }; // ⍞ -- APL Functional Symbol Quote Quad + // ; + key { [ U22A2 ] }; // ⊢ -- Right Tack + // ' + key { [ U22A3 ] }; // ⊣ -- Left Tack + + // C + key { [ NoSymbol, U235D ] }; // ⍝ -- APL Functional Symbol Up Shoe Jot + // B + key { [ NoSymbol, U234E ] }; // ⍎ -- APL Functional Symbol Down Tack Jot (Unicode got the name wrong; it should have been "Up Tack") + // N + key { [ NoSymbol, U2355 ] }; // ⍕ -- APL Functional Symbol Up Tack Jot (Unicode got the name wrong; it should have been "Down Tack") + // M + key { [ NoSymbol, U2336 ] }; // ⌶ -- APL Functional Symbol I-Beam + // , + key { [ U235E, U236A ] }; // ⍞ ⍪ -- APL Functional Symbol Quote Quad / APL Functional Symbol Comma Bar + // . + key { [ U234E, U2359 ] }; // ⍎ ⍙ -- [See B key] / APL Functional Symbol Delta Underbar + // / + key { [ U2355, U233F ] }; // ⍕ ⌿ -- [See N key] / APL Functional Symbol Slash Bar + + key { [ U235D, U2340 ] }; // ⍝ ⍀ -- APL Functional Symbol Up Shoe Jot / APL Functional Symbol Backslash Bar +}; + +// Layout: http://www.wickensonline.co.uk/apl-unicomp.html +partial alphanumeric_keys modifier_keys +xkb_symbols "apl2" { + name[Group1]= "APL Keyboard Symbols: IBM APL2"; + + include "apl(common)" + + // The first column is NoSymbol because it inherits. The second is NoSymbol because those keys don't do anything + + // ` + key { [ NoSymbol, U233B, U2342 ] }; // ⌻ ⍂ -- + key { [ NoSymbol, NoSymbol, U2336 ] }; // ⌶ -- APL Functional Symbol I-Beam + key { [ NoSymbol, NoSymbol, U236B ] }; // ⍫ -- APL Functional Symbol Del Tilde + key { [ NoSymbol, NoSymbol, U2353 ] }; // ⍒ -- APL Functional Symbol Del Stile + key { [ NoSymbol, NoSymbol, U234B ] }; // ⍋ -- APL Functional Symbol Delta Stile + key { [ NoSymbol, NoSymbol, U233D ] }; // ⌽ -- APL Functional Symbol Circle Stile + key { [ NoSymbol, NoSymbol, U2349 ] }; // ⍉ -- APL Functional Symbol Circle Backslash + key { [ NoSymbol, NoSymbol, U2296 ] }; // ⊖ -- Circled Minus + key { [ NoSymbol, NoSymbol, U235F ] }; // ⍟ -- APL Functional Symbol Circle Star + key { [ NoSymbol, NoSymbol, U2371 ] }; // ⍱ -- APL Functional Symbol Down Caret Tilde + key { [ NoSymbol, NoSymbol, U2372 ] }; // ⍲ -- APL Functional Symbol Up Caret Tilde + // - + key { [ plus, minus, exclam ] }; + // = + key { [ U00D7, U00F7, U2339 ] }; // × ÷ ⌹ -- Multiplication Sign / Division Sign / APL Functional Symbol Quad Divide + + // [ + key { [ NoSymbol, U2192, U235E ] }; // (←) → ⍞ -- Rightwards Arrow / APL Functional Symbol Quote Quad + // ] + key { [ U2337, U2378, U2359 ] }; // ⌷ ⍸ ⍙ -- APL Functional Symbol Squish Quad / APL Functional Symbol Iota Underbar / APL Functional Symbol Delta Underbar + + // ; + key { [ bracketleft, parenleft, U234E ] }; // ⍎ -- [See B key in SAX layout] + // ' + key { [ bracketright, parenright, U2355 ] }; // ⍕ -- [See N key in SAX layout] + + // , + key { [ comma, semicolon, U235D ] }; // ⍝ -- APL Functional Symbol Up Shoe Jot + // . + key { [ period, colon, U2340 ] }; // ⍀ -- APL Functional Symbol Backslash Bar + // / + key { [ slash, backslash, U233F ] }; // ⌿ -- APL Functional Symbol Slash Bar + + key { [ U2261, U2377, U2364 ] }; // ≡ ⍷ ⍤ -- Identical To / APL Functional Symbol Epsilon Underbar / APL Functional Symbol Jot Diaeresis +}; + +partial alphanumeric_keys modifier_keys +xkb_symbols "aplplusII" { + name[Group1]= "APL Keyboard Symbols: Manugistics APL*PLUS II"; + + include "apl(apl2)" + + // ` + key { [ dollar, U22C4, U236A ] }; // ⋄ ⍪ -- Diamond Operator / APL Functional Symbol Comma Bar + key { [ NoSymbol, NoSymbol, U2261 ] }; // ≡ -- Identical To + + // [ + key { [ U2190, NoSymbol, U235E ] }; // ← ⍞ -- Leftwards Arrow / APL Functional Symbol Quote Quad + // ] + key { [ U2192, NoSymbol, U236C ] }; // → ⍬ -- Rightwards Arrow / APL Functional Symbol Zilde + + // ; + key { [ bracketleft, parenleft, U234E ] }; // ⍎ -- [See B key in SAX layout] + // ' + key { [ bracketright, parenright, U2355 ] }; // ⍕ -- [See N key in SAX layout] + + key { [ U22A3, U22A2, U2359 ] }; // ⊣ ⊢ ⍙ -- Left Tack / Right Tack / APL Functional Symbol Delta Underbar +}; + + +// MicroAPL layout: http://aplwiki.com/APLXKeyboardLayouts +// I didn't do the old-style MicroAPL layout; patches gratefully accepted +partial alphanumeric_keys modifier_keys +xkb_symbols "aplx" { + name[Group1]= "APL Keyboard Symbols: APLX Unified APL Layout"; + + include "apl(unified)" + + // ` + key { [ NoSymbol, U235E ] }; // ⍞ -- APL Functional Symbol Quote Quad + key { [ NoSymbol, U2336 ] }; // ⌶ -- APL Functional Symbol I-Beam + key { [ NoSymbol, U236B ] }; // ⍫ -- APL Functional Symbol Del Tilde + key { [ NoSymbol, U2353 ] }; // ⍒ -- APL Functional Symbol Del Stile + key { [ NoSymbol, U234B ] }; // ⍋ -- APL Functional Symbol Delta Stile + key { [ NoSymbol, U233D ] }; // ⌽ -- APL Functional Symbol Circle Stile + key { [ NoSymbol, U2349 ] }; // ⍉ -- APL Functional Symbol Circle Backslash + key { [ NoSymbol, U2296 ] }; // ⊖ -- Circled Minus + key { [ NoSymbol, U235F ] }; // ⍟ -- APL Functional Symbol Circle Star + // - + key { [ NoSymbol, exclam ] }; + + // [ + key { [ NoSymbol, U2347 ] }; // ⍇ -- Box With Left Arrow + // ] + key { [ NoSymbol, U2348 ] }; // ⍈ -- Box With Right Arrow + + // ; + key { [ U234E, U2261 ] }; // ⍎ ≡ -- [See B key in SAX layout] / Identical To + // ' + key { [ U2355, U2262 ] }; // ⍕ ≢ -- [See N key in SAX layout] / Not Identical To + + // , + key { [ U235D, U236A ] }; // ⍝ ⍪ -- APL Functional Symbol Up Shoe Jot / APL Functional Symbol Comma Bar + // . + key { [ U2340, U2364 ] }; // ⍀ ⍤ -- APL Functional Symbol Backslash Bar / APL Functional Symbol Jot Diaeresis + // / + key { [ U233F ] }; // ⌿ -- APL Functional Symbol Slash Bar + + key { [ U22A3, U22A3 ] }; // ⊣ ⊢ -- Left Tack / Right Tack +}; + + diff --git a/xkbrules.am b/xkbrules.am index 6fde169f..0251b749 100644 --- a/xkbrules.am +++ b/xkbrules.am @@ -8,7 +8,7 @@ dirdir = $(xkb_base) $(subdir).dir: $(dir_data) -rm -f $@ - here=$$(pwd); cd $(srcdir) && $(XKBCOMP) -lfhlpR -o $${here}/$@ '*' + here=$(abs_builddir); cd $(srcdir) && $(XKBCOMP) -lfhlpR -o $${here}/$@ '*' CLEANFILES = $(subdir).dir -- cgit v1.2.3