* [9fans] Fwd: Fix for using Plan9 compose sequences with Spanish keyboards in X
[not found] <AANLkTi=fhn5wwAAAUJuxw+fzC65P2kPvDRDwMggLk-_7@mail.gmail.com>
@ 2011-01-04 11:26 ` pmarin
2011-01-04 11:57 ` [9fans] " pmarin
0 siblings, 1 reply; 2+ messages in thread
From: pmarin @ 2011-01-04 11:26 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
Spanish keyboards use different keysyms which are generated by the
following dead keys:
asciitilde → dead_tilde
grave → dead_grave
asciicircum → dead_circumflex
apostrophe → dead_acute
The attached awk script can be used to fix the output of 'mklatinkbd -x':
mklatinkbd -x $PLAN9/lib/keyboard | awk -f spkeys.awk >$HOME/.XCompose
Cheers.
Pmarin
[-- Attachment #2: spkeys.awk --]
[-- Type: application/octet-stream, Size: 1030 bytes --]
# We need to do the folowing replazements:
# <Multi_key> <asciitilde> => <dead_tilde>
# <asciitilde> => <dead_tilde>
# <Multi_key> <grave> => <dead_grave>
# <grave> => <dead_grave>
# <Multi_key> <asciicircum> => <dead_circumflex>
# <asciicircum> => <dead_circumflex>
# <Multi_key> <apostrophe> => <dead_acute>
# <apostrophe> => <dead_acute>
BEGIN {
print "<dead_tilde> <space> : \"~\""
print "<dead_grave> <space> : \"`\""
print "<dead_acute> <space> : \"'\""
print "<dead_circumflex> <space> : \"^\""
}
/^#/ {getline}
/^<Multi_key> <asciitilde>/ {
$1 = "<dead_tilde>"
$2 = ""
readline
}
/<asciitilde>/ {
gsub("<asciitilde>", "<dead_tilde>")
}
/^<Multi_key> <grave>/ {
$1 = ""
$2 = "<dead_grave>"
}
/<grave>/ {
gsub("<grave>", "<dead_grave>")
}
/^<Multi_key> <asciicircum>/ {
$1 = "<dead_circumflex>"
$2 = ""
}
/<asciicircum>/ {
gsub("<asciicircum>", "<dead_circumflex>")
}
/^<Multi_key> <apostrophe>/ {
$1 = ""
$2 = "<dead_acute>"
}
/<apostrophe>/ {
gsub("<apostrophe>", "<dead_acute>")
}
{print}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] Fix for using Plan9 compose sequences with Spanish keyboards in X
2011-01-04 11:26 ` [9fans] Fwd: Fix for using Plan9 compose sequences with Spanish keyboards in X pmarin
@ 2011-01-04 11:57 ` pmarin
0 siblings, 0 replies; 2+ messages in thread
From: pmarin @ 2011-01-04 11:57 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 568 bytes --]
Sorry I forgot the diaeresis:
quotedbl → dead_diaeresis
Reattached the awk script.
On Tue, Jan 4, 2011 at 12:26 PM, pmarin <pmarin.mail@gmail.com> wrote:
> Spanish keyboards use different keysyms which are generated by the
> following dead keys:
>
> asciitilde → dead_tilde
> grave → dead_grave
> asciicircum → dead_circumflex
> apostrophe → dead_acute
>
> The attached awk script can be used to fix the output of 'mklatinkbd -x':
>
> mklatinkbd -x $PLAN9/lib/keyboard | awk -f spkeys.awk >$HOME/.XCompose
>
> Cheers.
> Pmarin
>
[-- Attachment #2: spkeys.awk --]
[-- Type: application/octet-stream, Size: 1197 bytes --]
# We need to do the folowing replazements:
# <Multi_key> <asciitilde> => <dead_tilde>
# <asciitilde> => <dead_tilde>
# <Multi_key> <grave> => <dead_grave>
# <grave> => <dead_grave>
# <Multi_key> <asciicircum> => <dead_circumflex>
# <asciicircum> => <dead_circumflex>
# <Multi_key> <apostrophe> => <dead_acute>
# <apostrophe> => <dead_acute>
BEGIN {
print "<dead_tilde> <space> : \"~\""
print "<dead_grave> <space> : \"`\""
print "<dead_acute> <space> : \"'\""
print "<dead_circumflex> <space> : \"^\""
print "<dead_diaeresis> <space> : \"¨\""
}
/^#/ {getline}
/^<Multi_key> <asciitilde>/ {
$1 = "<dead_tilde>"
$2 = ""
readline
}
/<asciitilde>/ {
gsub("<asciitilde>", "<dead_tilde>")
}
/^<Multi_key> <grave>/ {
$1 = ""
$2 = "<dead_grave>"
}
/<grave>/ {
gsub("<grave>", "<dead_grave>")
}
/^<Multi_key> <asciicircum>/ {
$1 = "<dead_circumflex>"
$2 = ""
}
/<asciicircum>/ {
gsub("<asciicircum>", "<dead_circumflex>")
}
/^<Multi_key> <apostrophe>/ {
$1 = ""
$2 = "<dead_acute>"
}
/<apostrophe>/ {
gsub("<apostrophe>", "<dead_acute>")
}
/^<Multi_key> <quotedbl>/ {
$1 = ""
$2 = "<dead_diaeresis>"
}
/<quotedbl>/ {
gsub("<quotedbl>", "<dead_diaeresis>")
}
{print}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-04 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <AANLkTi=fhn5wwAAAUJuxw+fzC65P2kPvDRDwMggLk-_7@mail.gmail.com>
2011-01-04 11:26 ` [9fans] Fwd: Fix for using Plan9 compose sequences with Spanish keyboards in X pmarin
2011-01-04 11:57 ` [9fans] " pmarin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).