I finally wrote a GNU/apl XCompose file that can provide a quick, no
headaches :) alternative to more orthodox methods such as xmodmap or
setxkbmap + a third-level modifier.

This hack may come in handy for new users of GNU/apl who already rely on
a custom keyboard layout where the third-level modifier is used for
other purposes (navigation keypad - arrows, PgDown.. - numpad, special
characters, multimedia keys, exotic scripts)

The layout is meant to reflect the output of the GNU/apl ]KEYB command
(characters & location).

The definitions have been tested in the GNU/apl shell as well as Vim
running on top of an XTerm.

Enabling on GNU/linux:

1. Define a Compose key. Various online articles describe how to do this
   depending on your desktop environment.

2. Copy the attached XCompose file as ~/.XCompose to your home
   directory.

Limitations: 

1. I have not been able to get my custom Compose definitions to work in
   GTK apps (firefox, gvim). Search online for possible solutions. They
   appear to work in KDE/Qt apps without any customization.

2. Won't work in environments that do not support the X Compose key
   mechanism.

In order to avoid conflicts with the standard Compose sequences,
I prepended a <space> prefix to all my definitions. Some may find having
to hit three keys in succession unpractical. Such aspects can easily be
customized to suit your requirements.

CJ

# UTF-8 (Unicode) custom compose sequences

# seems you MUST import system-wide definitions or else you lose them (?)
#
include "%L"

# Sundries

# GNU/APL - using the space bar as prefix

# TOP (NUMBERS) ROW
 
 <Multi_key> <space>  <asciitilde>           : "⍨"  U2368 # APL FUNCTIONAL 
SYMBOL TILDE DIAERESIS
 <Multi_key> <space>  <grave>                : "◊"  U25CA # LOZENGE
 
 <Multi_key> <space>  <exclam>               : "¡"  U25CA # INVERTED 
EXCLAMATION MARK
 <Multi_key> <space>  <1>                    : "¨"  U25CA # DIAERESIS

 <Multi_key> <space>  <at>                   : "€"  U20AC # EURO SIGN
 <Multi_key> <space>  <2>                    : "¯"  U00AF # MACRON

 <Multi_key> <space>  <numbersign>           : "£"  U00A3 # POUND SIGN
 <Multi_key> <space>  <3>                    : "<"  U003C # LESS-THAN SIGN

 <Multi_key> <space>  <dollar>               : "⍧"  U2367 # APL FUNCTIONAL 
SYMBOL LEFT SHOE STILE
 <Multi_key> <space>  <4>                    : "≤"  U2264 # LESS-THAN OR EQUAL 
TO

 <Multi_key> <space>  <percent>              : "█"  U2588 # *** Unassigned ***
 <Multi_key> <space>  <5>                    : "="  U003D # EQUALS SIGN

 <Multi_key> <space>  <^>                    : "█"  U2588 # *** Unassigned ***
 <Multi_key> <space>  <6>                    : "≥"  U2265 # GREATER-THAN OR 
EQUAL TO

 <Multi_key> <space>  <ampersand>            : "█"  U2588 # *** Unassigned ***
 <Multi_key> <space>  <7>                    : ">"  U003E # GREATER-THAN SIGN

 <Multi_key> <space>  <asterisk>             : "⍂"  U2342 # APL FUNCTIONAL 
SYMBOL QUAD BACKSLASH
 <Multi_key> <space>  <8>                    : "≠"  U2260 # NOT IDENTICAL TO

 <Multi_key> <space>  <parenleft>            : "⍱"  U2371 # APL FUNCTIONAL 
SYMBOL DOWN CARET TILDE
 <Multi_key> <space>  <9>                    : "∨"  U2228 # LOGICAL OR

 <Multi_key> <space>  <parenright>           : "⍲"  U2372 # APL FUNCTIONAL 
SYMBOL UP CARET TILDE
 <Multi_key> <space>  <0>                    : "∧"  U2227 # LOGICAL AND

 <Multi_key> <space>  <underscore>           : "≡"  U2261 # APL FUNCTIONAL 
SYMBOL UP CARET TILDE
 <Multi_key> <space>  <minus>                : "×"  U00D7 # MULTIPLICATION SIGN

 <Multi_key> <space>  <plus>                 : "⌹"  U2339 # APL FUNCTIONAL 
SYMBOL UP CARET TILDE
 <Multi_key> <space>  <equal>                : "÷"  U00F7 # DIVISION SIGN
 
# SECOND ROW (Q W E R T Y . . . )

 <Multi_key> <space>  <Q>                    : "¿"  U00BF # INVERTED QUESTION 
MARK
 <Multi_key> <space>  <q>                    : "?"  U003F # QUESTION MARK

 <Multi_key> <space>  <W>                    : "⌽"  U233D # APL FUNCTIONAL 
SYMBOL CIRCLE STILE
 <Multi_key> <space>  <w>                    : "⍵"  U2375 # APL FUNCTIONAL 
SYMBOL OMEGA

 <Multi_key> <space>  <E>                    : "⍷"  U2377 # APL FUNCTIONAL 
SYMBOL EPSILON UNDERBAR
 <Multi_key> <space>  <e>                    : "∈"  U2208 # ELEMENT OF

 <Multi_key> <space>  <R>                    : "█"  U2588 # *** unassigned ***
 <Multi_key> <space>  <r>                    : "⍴"  U2374 # APL FUNCTIONAL 
SYMBOL RHO

 <Multi_key> <space>  <T>                    : "⍉"  U2349 # APL FUNCTIONAL 
SYMBOL CIRCLE BACKSLASH
 <Multi_key> <space>  <t>                    : "∼"  U223C # TILDE OPERATOR

 <Multi_key> <space>  <Y>                    : "¥"  U00A5 # YEN SIGN
 <Multi_key> <space>  <y>                    : "↑"  U2191 # UPWARDS ARROW

# <MULTI_KEY> <SPACE>  <U>  IS UNUSED: IT IS THE ESCAPE SEQUENCE USED TO ENTER 
UNICODE CODE POINTS

 <Multi_key> <space>  <u>                    : "↓"  U2193 # DOWNWARDS ARROW

 <Multi_key> <space>  <I>                    : "⍸"  U2378 # APL FUNCTIONAL 
SYMBOL IOTA UNDERBAR
 <Multi_key> <space>  <i>                    : "⍳"  U2373 # APL FUNCTIONAL 
SYMBOL IOTA

 <Multi_key> <space>  <O>                    : "⍥"  U2365 # APL FUNCTIONAL 
SYMBOL CIRCLE DIAERESIS
 <Multi_key> <space>  <o>                    : "○"  U25CB # WHITE CIRCLE

 <Multi_key> <space>  <P>                    : "⍟"  U235F # APL FUNCTIONAL 
SYMBOL CIRCLE STAR
 <Multi_key> <space>  <p>                    : "⋆"  U22C6 # STAR OPERATOR

 <Multi_key> <space>  <braceleft>            : "█"  U2588 # *** unassigned ***
 <Multi_key> <space>  <bracketleft>          : "←"  U2190 # LEFTWARDS ARROW

 <Multi_key> <space>  <braceright>           : "⍬"  U236C # APL FUNCTIONAL 
SYMBOL ZILDE
 <Multi_key> <space>  <bracketright>         : "→"  U2192 # RIGHTWARDS ARROW

 <Multi_key> <space>  <bar>                  : "⍀"  U2340 # APL FUNCTIONAL 
SYMBOL BACKSLASH BAR
 <Multi_key> <space>  <backslash>            : "⍝"  U235D # APL FUNCTIONAL 
SYMBOL UP SHOE JOT
 
# THIRD ROW  (A S D F G H . . . )

 <Multi_key> <space>  <A>                    : "⊖"  U2296 # CIRCLED MINUS
 <Multi_key> <space>  <a>                    : "⍺"  U237A # APL FUNCTIONAL 
SYMBOL ALPHA

 <Multi_key> <space>  <S>                    : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <s>                    : "⌈"  U2308 # LEFT CEILING

 <Multi_key> <space>  <D>                    : "█"  U2588 # *** unassigned ***
 <Multi_key> <space>  <d>                    : "⌊"  U230A # LEFT FLOOR

 <Multi_key> <space>  <F>                    : "⍫"  U2296 # APL FUNCTIONAL 
SYMBOL DEL TILDE
 <Multi_key> <space>  <f>                    : "_"  U005F # LOW LINE

 <Multi_key> <space>  <G>                    : "⍒"  U2352 # APL FUNCTIONAL 
SYMBOL DEL STILE
 <Multi_key> <space>  <g>                    : "∇"  U2207 # NABLA

 <Multi_key> <space>  <H>                    : "⍋"  U234B # APL FUNCTIONAL 
SYMBOL DELTA STILE
 <Multi_key> <space>  <h>                    : "∆"  U2206 # INCREMENT

 <Multi_key> <space>  <J>                    : "⍤"  U2364 # APL FUNCTIONAL 
SYMBOL JOT DIAERESIS
 <Multi_key> <space>  <j>                    : "∘"  U2218 # RING OPERATOR

 <Multi_key> <space>  <K>                    : "⌺"  U233A # APL FUNCTIONAL 
SYMBOL QUAD DIAMOND
 <Multi_key> <space>  <k>                    : "'"  U0027 # APOSTROPHE

 <Multi_key> <space>  <K>                    : "⌺"  U233A # APL FUNCTIONAL 
SYMBOL QUAD DIAMOND
 <Multi_key> <space>  <k>                    : "'"  U0027 # APOSTROPHE

 <Multi_key> <space>  <L>                    : "⍞"  U235E # APL FUNCTIONAL 
SYMBOL QUOTE QUAD
 <Multi_key> <space>  <l>                    : "⎕"  U2395 # APL FUNCTIONAL 
SYMBOL QUAD

 <Multi_key> <space>  <colon>                : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <semicolon>            : "⊢"  U22A2 # RIGHT TACK

 <Multi_key> <space>  <quotedbl>             : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <apostrophe>           : "⊣"  U22A3 # LEFT TACK
 
# FOURTH ROW (Z X C V B N . . . )

 <Multi_key> <space>  <Z>                    : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <z>                    : "⊂"  U2282 # SUBSET OF

 <Multi_key> <space>  <X>                    : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <x>                    : "⊃"  U2283 # SUPERSET OF

 <Multi_key> <space>  <C>                    : "⍝"  U235D # APL FUNCTIONAL 
SYMBOL UP SHOE JOT
 <Multi_key> <space>  <c>                    : "∩"  U2229 # INTERSECTION

 <Multi_key> <space>  <V>                    : "█"  U2296 # *** unassigned ***
 <Multi_key> <space>  <v>                    : "∪"  U222A # UNION

 <Multi_key> <space>  <B>                    : "⍎"  U234E # APL FUNCTIONAL 
SYMBOL DOWN TACK JOT
 <Multi_key> <space>  <b>                    : "⊥"  U22A5 # UP TACK

 <Multi_key> <space>  <N>                    : "⍕"  U2355 # APL FUNCTIONAL 
SYMBOL UP TACK JOT
 <Multi_key> <space>  <n>                    : "⊤"  U22A4 # UP UP TACK

 <Multi_key> <space>  <M>                    : "⌶"  U2336 # APL FUNCTIONAL 
SYMBOL I-BEAM
 <Multi_key> <space>  <m>                    : "|"  U007C # VERTICAL LINE

 <Multi_key> <space>  <less>                 : "⍪"  U236A # APL FUNCTIONAL 
SYMBOL COMMA BAR
 <Multi_key> <space>  <comma>                : "⌷"  U2337 # APL FUNCTIONAL 
SYMBOL SQUISH QUAD

 <Multi_key> <space>  <greater>              : "⍙"  U2359 # APL FUNCTIONAL 
SYMBOL DELTA UNDERBAR
 <Multi_key> <space>  <period>               : "⍎"  U234E # APL FUNCTIONAL 
SYMBOL DOWN TACK JOT

 <Multi_key> <space>  <question>             : "⌿"  U233F # APL FUNCTIONAL 
SYMBOL DELTA UNDERBAR
 <Multi_key> <space>  <slash>                : "⍕"  U2355 # APL FUNCTIONAL 
SYMBOL UP TACK JOT

Reply via email to