blob: f95be6e6540b06a71c5ec8bb11e81c5bc2e6042d (
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
|
############################################################################
#
# File: kmap.icn
#
# Subject: Procedure to map keyboard letter forms into letters
#
# Author: Ralph E. Griswold
#
# Date: July 15, 1995
#
############################################################################
#
# This file is in the public domain.
#
############################################################################
#
# This procedure maps uppercase letters and the control modifier key
# in combination with letters into the corresponding lowercase letters.
#
# It is intended for use with graphic applications in which the modifier
# keys for shift and control are encoded in keyboard events.
#
############################################################################
procedure kmap(s) #: map letter with modifier key to lowercase
static in, out
initial {
in := "\^A\^B\^C\^D\^E\^F\^G\^H\^I\^J\^K\^L\^M\^N\^O\^P_
\^Q\^R\^S\^T\^U\^V\^W\^X\^Y\^Z" || &ucase
out := &lcase || &lcase
}
return map(s, in, out)
end
|