package provide deadkeys 1.0 # Tk-Package zur Belegung von Tasten # mit Totfunktion. # (c) 2004 by Holger Jakobs # Bergisch Gladbach # E-Mail: holger@jakobs.com # $Author: hj $ # $Date: 2004/01/28 14:57:35 $ # $RCSfile: deadkeys.tex,v $ $Revision: 1.1 $ ### Akzent-Tasten # Liste mit allen Klassen, die betroffen sind set classes [list Text Entry] set switch "" foreach class $classes { bind $class { if {$switch == ""} { set switch "acute" } else { set switch "" } ;# if break } ;# bind bind $class { if {$switch == ""} { set switch "grave" } else { set switch "" } ;# if break } ;# bind bind $class { if {$switch == ""} { set switch "circum" } else { set switch "" } ;# if break } ;# bind bind $class { if {$switch == ""} { set switch "degree" } else { set switch "" } ;# if break } ;# bind bind $class { if {"%A" == "~"} { if {$switch == ""} { set switch "tilde" } else { set switch "" } ;# if break } ;# if if {"%A" == "'" && "%K" != "apostrophe"} { if {$switch == ""} { set switch "acute" } else { set switch "" } ;# if break } ;# if set ch "%A" set i_ch "%A" if {$switch != "" && "%A" != "{}"} { if {$switch == "acute"} { switch -- %A { " " {set i_ch "\u00b4"} a {set i_ch "\u00e1"} A {set i_ch "\u00c1"} e {set i_ch "\u00e9"} E {set i_ch "\u00c9"} i {set i_ch "\u00ed"} I {set i_ch "\u00cd"} o {set i_ch "\u00f3"} O {set i_ch "\u00d3"} u {set i_ch "\u00fa"} U {set i_ch "\u00da"} c {set i_ch "\u0107"} C {set i_ch "\u0106"} n {set i_ch "\u0144"} N {set i_ch "\u0143"} l {set i_ch "\u013A"} L {set i_ch "\u0139"} s {set i_ch "\u015B"} S {set i_ch "\u015A"} r {set i_ch "\u0155"} R {set i_ch "\u0154"} z {set i_ch "\u017A"} Z {set i_ch "\u0179"} } ;# switch } elseif {$switch == "grave"} { switch -- %A { " " {set i_ch "\u0060"} a {set i_ch "\u00e0"} A {set i_ch "\u00c0"} e {set i_ch "\u00e8"} E {set i_ch "\u00c8"} i {set i_ch "\u00ec"} I {set i_ch "\u00cc"} o {set i_ch "\u00f2"} O {set i_ch "\u00d2"} u {set i_ch "\u00f9"} U {set i_ch "\u00d9"} } ;# switch } elseif {$switch == "circum"} { switch -- %A { " " {set i_ch "^"} a {set i_ch "\u00e2"} A {set i_ch "\u00c2"} e {set i_ch "\u00ea"} E {set i_ch "\u00ca"} i {set i_ch "\u00ee"} I {set i_ch "\u00ce"} j {set i_ch "\u0135"} J {set i_ch "\u0134"} o {set i_ch "\u00f4"} O {set i_ch "\u00d4"} u {set i_ch "\u00fb"} U {set i_ch "\u00db"} w {set i_ch "\u0175"} W {set i_ch "\u0174"} y {set i_ch "\u0177"} Y {set i_ch "\u0176"} c {set i_ch "\u0109"} C {set i_ch "\u0108"} s {set i_ch "\u015D"} S {set i_ch "\u015C"} g {set i_ch "\u011F"} G {set i_ch "\u011E"} } ;# switch } elseif {$switch == "degree"} { switch -- %A { " " {set i_ch "\u00b0"} a {set i_ch "\u00e5"} A {set i_ch "\u00c5"} e {set i_ch "\u00eb"} E {set i_ch "\u00cb"} i {set i_ch "\u0131"} I {set i_ch "\u0130"} o {set i_ch "\u0153"} O {set i_ch "\u0152"} u {set i_ch "\u016F"} U {set i_ch "\u016E"} c {set i_ch "\u00E7"} C {set i_ch "\u00C7"} g {set i_ch "\u011F"} G {set i_ch "\u011E"} s {set i_ch "\u015F"} S {set i_ch "\u015E"} {!} {set i_ch "\u00A1"} {?} {set i_ch "\u00BF"} } ;# switch } elseif {$switch == "tilde"} { switch -- %A { " " {set i_ch "\u007e"} a {set i_ch "\u00e3"} A {set i_ch "\u00c3"} i {set i_ch "\u0129"} I {set i_ch "\u0128"} o {set i_ch "\u00f5"} O {set i_ch "\u00d5"} u {set i_ch "\u0169"} U {set i_ch "\u0168"} n {set i_ch "\u00f1"} N {set i_ch "\u00d1"} } ;# switch } ;# if } ;# if if {$i_ch != "{}"} { %W insert insert "$i_ch" set switch "" } ;# if } ;# bind } ;# foreach class