summaryrefslogtreecommitdiff
path: root/symbols/extras/apl
blob: bf1ae71a9d3a67219ffecba726d1568e08782922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
// 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";

	key <AE01> { [	diaeresis	] };
	key <AE02> { [	U00AF	] }; // ¯ -- Macron
	key <AE03> { [	less	] };
	key <AE04> { [	U2264	] }; // ≤ -- Less-than Or Equal To
	key <AE05> { [	equal	] };
	key <AE06> { [	U2265	] }; // ≥ -- Greater-than Or Equal To
	key <AE07> { [	greater	] };
	key <AE08> { [	U2260	] }; // ≠ -- Not Equal To
	key <AE09> { [	U2228	] }; // ∨ -- Logical Or
	key <AE10> { [	U2227	] }; // ∧ -- Logical And

	// Q
	key <AD01> { [	question	] };
	// W
	key <AD02> { [	U2375		] }; // ⍵ -- APL Functional Symbol Omega
	// E
	key <AD03> { [	U220A		] }; // ∊ -- Small Element Of
	// R
	key <AD04> { [	U2374		] }; // ⍴ -- APL Functional Symbol Rho
	// T
	key <AD05> { [	asciitilde		] };
	// Y
	key <AD06> { [	U2191		] }; // ↑ -- Upwards Arrow
	// U
	key <AD07> { [	U2193		] }; // ↓ -- Downwards Arrow
	// I
	key <AD08> { [	U2373	] }; // ⍳ -- APL Functional Symbol Iota
	// O
	key <AD09> { [	U25CB	] }; // ○ -- White Circle
	// P
	key <AD10> { [	U22C6	] }; // ⋆ -- Should this be a plain asterisk, or the star operator???
	// [
	key <AD11> { [	U2190	] }; // ← -- Leftwards Arrow

	// A
	key <AC01> { [	U237A	] }; // ⍺ -- APL Functional Symbol Alpha
	// S
	key <AC02> { [	U2308	] }; // ⌈ -- Left Ceiling
	// D
	key <AC03> { [	U230A	] }; // ⌊ -- Left Floor
	// F
	key <AC04> { [	underscore	] };
	// G
	key <AC05> { [	U2207	] }; // ∇ -- Nabla
	// H
	key <AC06> { [	U2206	] }; // ∆ -- Increment
	// J
	key <AC07> { [	U2218	] }; // ∘ -- Ring Operator
	// K
	key <AC08> { [	apostrophe ] };
	// L
	key <AC09> { [	U2395	] }; // ⎕ -- APL Functional Symbol Quad

	// Z
	key <AB01> { [	U2282	] }; // ⊂ -- Subset Of
	// X
	key <AB02> { [	U2283	] }; // ⊃ -- Superset Of
	// C
	key <AB03> { [	U2229	] }; // ∩ -- Intersection
	// V
	key <AB04> { [	U222A	] }; // ∪ -- Union
	// B
	key <AB05> { [	U22A5	] }; // ⊥ -- Up Tack
	// N
	key <AB06> { [	U22A4	] }; // ⊤ -- Down Tack
	// M
	key <AB07> { [	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 <TLDE> { [	U22C4	] }; // ⋄ -- Diamond Operator
	key <AE09> { [	NoSymbol,	U2371	] }; // ⍱ -- APL Functional Symbol Down Caret Tilde
	key <AE10> { [	NoSymbol,	U2372	] }; // ⍲ -- APL Functional Symbol Up Caret Tilde
	// -
	key <AE11> { [	U00D7	] }; // × -- Multiplication Sign
	// =
	key <AE12> { [	U00F7,	U2339	] }; // ÷ ⌹ -- Division Sign / APL Functional Symbol Quad Divide

	// ]
	key <AD12> { [	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 <AE01> { [	NoSymbol,	U00A1	] }; // ¡ -- Inverted Exclamation Mark
	key <AE04> { [	NoSymbol,	cent	] };
	key <AE08> { [	NoSymbol,	U2342	] }; // ⍂ -- APL Functional Symbol Quad Backslash
	// -
	key <AE11> { [	NoSymbol,	U2261	] }; // ≡ -- Identical To

	// Q
	key <AD01> { [	NoSymbol,	U00BF	] }; // ¿ -- Inverted Question Mark
	// W
	key <AD02> { [	NoSymbol,	U233D	] }; // ⌽ -- APL Functional Symbol Circle Stile
	// E
	key <AD03> { [	NoSymbol,	U2377	] }; // ⍷ -- APL Functional Symbol Epsilon Underbar
	// T
	key <AD05> { [	NoSymbol,	U2349	] }; // ⍉ -- APL Functional Symbol Circle Backslash
	// I
	key <AD08> { [	NoSymbol,	U2378	] }; // ⍸ -- APL Functional Symbol Iota Underbar
	// O
	key <AD09> { [	NoSymbol,	U2365	] }; // ⍥ -- APL Functional Symbol Circle Diaeresis
	// P
	key <AD10> { [	NoSymbol,	U235F	] }; // ⍟ -- APL Functional Symbol Circle Star

	// A
	key <AC01> { [	NoSymbol,	U2296	] }; // ⊖ -- Circled Minus
	// F
	key <AC04> { [	NoSymbol,	U236B	] }; // ⍫ -- APL Functional Symbol Del Tilde
	// G
	key <AC05> { [	NoSymbol,	U2352	] }; // ∇ ⍒ -- APL Functional Symbol Del Stile
	// H
	key <AC06> { [	NoSymbol,	U234B	] }; // ∆ ⍋ -- APL Functional Symbol Delta Stile
	// J
	key <AC07> { [	NoSymbol,	U2364	] }; // ⍤ -- APL Functional Symbol Jot Diaeresis
	// K
	key <AC08> { [	NoSymbol,	U233B	] }; // ⌻
	// L
	key <AC09> { [	NoSymbol,	U235E	] }; // ⍞ -- APL Functional Symbol Quote Quad
	// ;
	key <AC10> { [	U22A2	] }; // ⊢ -- Right Tack
	// '
	key <AC11> { [	U22A3	] }; // ⊣ -- Left Tack

	// C
	key <AB03> { [	NoSymbol,	U235D	] }; // ⍝ -- APL Functional Symbol Up Shoe Jot
	// B
	key <AB05> { [	NoSymbol,	U234E	] }; // ⍎ -- APL Functional Symbol Down Tack Jot (Unicode got the name wrong; it should have been "Up Tack")
	// N
	key <AB06> { [	NoSymbol,	U2355	] }; // ⍕ -- APL Functional Symbol Up Tack Jot (Unicode got the name wrong; it should have been "Down Tack")
	// M
	key <AB07> { [	NoSymbol,	U2336	] }; // ⌶ -- APL Functional Symbol I-Beam
	// ,
	key <AB08> { [	U235E,	U236A	] }; // ⍞ ⍪ -- APL Functional Symbol Quote Quad / APL Functional Symbol Comma Bar
	// .
	key <AB09> { [	U234E,	U2359	] }; // ⍎ ⍙ -- [See B key] / APL Functional Symbol Delta Underbar
	// /
	key <AB10> { [	U2355,	U233F	] }; // ⍕ ⌿ -- [See N key] / APL Functional Symbol Slash Bar

	key <BKSL> { [	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 <TLDE> { [	NoSymbol,	U233B,	U2342	] }; // ⌻ ⍂ -- 
	key <AE01> { [	NoSymbol, NoSymbol, U2336	] }; // ⌶ -- APL Functional Symbol I-Beam
	key <AE02> { [	NoSymbol, NoSymbol,	U236B	] }; // ⍫ -- APL Functional Symbol Del Tilde
	key <AE03> { [	NoSymbol, NoSymbol,	U2353	] }; // ⍒ -- APL Functional Symbol Del Stile
	key <AE04> { [	NoSymbol, NoSymbol,	U234B	] }; // ⍋ -- APL Functional Symbol Delta Stile
	key <AE05> { [	NoSymbol, NoSymbol,	U233D	] }; // ⌽ -- APL Functional Symbol Circle Stile
	key <AE06> { [	NoSymbol, NoSymbol,	U2349	] }; // ⍉ -- APL Functional Symbol Circle Backslash
	key <AE07> { [	NoSymbol, NoSymbol,	U2296	] }; // ⊖ -- Circled Minus
	key <AE08> { [	NoSymbol, NoSymbol,	U235F	] }; // ⍟ -- APL Functional Symbol Circle Star
	key <AE09> { [	NoSymbol, NoSymbol,	U2371	] }; // ⍱ -- APL Functional Symbol Down Caret Tilde
	key <AE10> { [	NoSymbol, NoSymbol,	U2372	] }; // ⍲ -- APL Functional Symbol Up Caret Tilde
	// -
	key <AE11> { [	plus,	minus,	exclam	] };
	// =
	key <AE12> { [	U00D7,	U00F7,	U2339	] }; // × ÷ ⌹ -- Multiplication Sign / Division Sign / APL Functional Symbol Quad Divide

	// [
	key <AD11> { [	NoSymbol,	U2192,	U235E	] }; // (←) → ⍞ -- Rightwards Arrow / APL Functional Symbol Quote Quad
	// ]
	key <AD12> { [	U2337,	U2378,	U2359	] }; // ⌷ ⍸ ⍙ -- APL Functional Symbol Squish Quad / APL Functional Symbol Iota Underbar / APL Functional Symbol Delta Underbar

	// ;
	key <AC10> { [	bracketleft, parenleft,	U234E	] }; // ⍎ -- [See B key in SAX layout]
	// '
	key <AC11> { [	bracketright, parenright, U2355	] }; // ⍕ -- [See N key in SAX layout] 

	// ,
	key <AB08> { [	comma,	semicolon, U235D ] }; // ⍝ -- APL Functional Symbol Up Shoe Jot
	// .
	key <AB09> { [	period,	colon,	U2340	] }; // ⍀ -- APL Functional Symbol Backslash Bar
	// /
	key <AB10> { [	slash,	backslash, U233F ] }; // ⌿ -- APL Functional Symbol Slash Bar

	key <BKSL> { [	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 <TLDE> { [	dollar,	U22C4,	U236A	] }; // ⋄ ⍪ -- Diamond Operator / APL Functional Symbol Comma Bar
	key <AE01> { [	NoSymbol, NoSymbol, U2261	] }; // ≡ -- Identical To

	// [
	key <AD11> { [	U2190,	NoSymbol,	U235E	] }; // ← ⍞ -- Leftwards Arrow / APL Functional Symbol Quote Quad
	// ]
	key <AD12> { [	U2192,	NoSymbol,	U236C	] }; // → ⍬ -- Rightwards Arrow / APL Functional Symbol Zilde

	// ;
	key <AC10> { [	bracketleft, parenleft,	U234E	] }; // ⍎ -- [See B key in SAX layout]
	// '
	key <AC11> { [	bracketright, parenright, U2355	] }; // ⍕ -- [See N key in SAX layout] 

	key <BKSL> { [	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 <TLDE> { [	NoSymbol,	U235E	] }; // ⍞ -- APL Functional Symbol Quote Quad
	key <AE01> { [	NoSymbol,	U2336	] }; // ⌶ -- APL Functional Symbol I-Beam
	key <AE02> { [	NoSymbol,	U236B	] }; // ⍫ -- APL Functional Symbol Del Tilde
	key <AE03> { [	NoSymbol,	U2353	] }; // ⍒ -- APL Functional Symbol Del Stile
	key <AE04> { [	NoSymbol,	U234B	] }; // ⍋ -- APL Functional Symbol Delta Stile
	key <AE05> { [	NoSymbol,	U233D	] }; // ⌽ -- APL Functional Symbol Circle Stile
	key <AE06> { [	NoSymbol,	U2349	] }; // ⍉ -- APL Functional Symbol Circle Backslash
	key <AE07> { [	NoSymbol,	U2296	] }; // ⊖ -- Circled Minus
	key <AE08> { [	NoSymbol,	U235F	] }; // ⍟ -- APL Functional Symbol Circle Star
	// -
	key <AE11> { [	NoSymbol,	exclam ] };

	// [
	key <AD11> { [	NoSymbol,	U2347	] }; // ⍇ -- Box With Left Arrow
	// ]
	key <AD12> { [	NoSymbol,	U2348	] }; // ⍈ -- Box With Right Arrow

	// ;
	key <AC10> { [	U234E,	U2261	] }; // ⍎ ≡ -- [See B key in SAX layout] / Identical To
	// '
	key <AC11> { [	U2355,	U2262	] }; // ⍕ ≢ -- [See N key in SAX layout] / Not Identical To

	// ,
	key <AB08> { [	U235D,	U236A	] }; // ⍝ ⍪ -- APL Functional Symbol Up Shoe Jot / APL Functional Symbol Comma Bar
	// .
	key <AB09> { [	U2340,	U2364	] }; // ⍀ ⍤ -- APL Functional Symbol Backslash Bar / APL Functional Symbol Jot Diaeresis
	// /
	key <AB10> { [	U233F ] }; // ⌿ -- APL Functional Symbol Slash Bar

	key <BKSL> { [	U22A3,	U22A3	] }; // ⊣ ⊢ -- Left Tack / Right Tack
};