Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,8 @@
package require Tk
# Show off some emacs-like bindings...
pack [label .l -text "C-x C-s to save, C-x C-c to quit"]
focus .
bind . <Control-x><Control-s> {
tk_messageBox -message "We would save here"
}
bind . <Control-x><Control-c> {exit}

View file

@ -0,0 +1,5 @@
bind . <F1> {
foreach c [split "Macro demo!" {}] {
event generate %W $c
}
}

View file

@ -0,0 +1,16 @@
package require Tk
proc sendMacro {w string} {
foreach c [split $string {}] {
# Will not work for < character...
event generate $w $c
}
}
proc macro {key translation} {
bind . <$key> [list sendMacro %W [string map {% %%} $translation]]
}
# Some demonstration macros
macro F1 "Help me!"
macro F2 "You pressed the F2 key"
macro F3 "I'm getting bored here..."
pack [text .t]; # A place for you to test the macros