Skip to main content

Posts

Showing posts from March, 2021

Getting Keyboard Lock and Overwrite Settings

        #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" if { [catch { package present Gnocl } ] } { package require Gnocl } set win [gnocl::window -child [gnocl::text -name txt] -setSize 0.25] exec xmodmap -e "add mod3 = Scroll_Lock" txt configure -onKeyRelease {     lassign [gnocl::keyboard %w] NumLock CapsLock ScrollLock     set Overwrite [%w cget -overwrite]          foreach item {NumLock CapsLock ScrollLock Overwrite} {         puts "$item   [set $item]"     }      }

March Updates

  Just a few tweaks this month. 2021-02:    gnocl::stringUtils         o new subcommands,             totitle, convert string to title string by capitalizing all word initial characters             toroman, convert Arabic integer to Roman numerals     gnocl::notebook         o tearoff tab window will now contain the same text as the child tab         o new command -tabCget     gnocl::dialog         o dialog now registered to obtain a widget-id, not directly           returned but easily obtained by child widgets using the           [gnocl::winfo toplevel %w] command.     gnocl::tree/list         o -onSelectionChanged now supports %d substitution string.         o -onWidthChanged, callback handler rewritten to automatically           update column wrapwdith when resized.