Menu

#258 MacOSX entry bindings

open
6
2008-12-08
2008-03-19
No

MacOSX has some behaviour that is different than current tk/ttk for Entry and TEntry widgets. There might be additional bindings with modifiers, but don't know how established these are.

The following bindings should either replace existing or added. This applies to Entry and TEntry widgets.

if {[tk windowingsystem] eq "aqua"} {

# Entry
bind Entry <Command-Left> {
%W icursor 0
%W selection clear
}
bind Entry <Command-Right> {
%W icursor end
%W selection clear
}
bind Entry <Control-Left> {
%W icursor 0
%W selection clear
}
bind Entry <Control-Right> {
%W icursor end
%W selection clear
}

# TEntry
bind TEntry <Command-Left> {
%W icursor 0
%W selection clear
}
bind TEntry <Command-Right> {
%W icursor end
%W selection clear
}
bind TEntry <Control-Left> {
%W icursor 0
%W selection clear
}
bind TEntry <Control-Right> {
%W icursor end
%W selection clear
}
}

Discussion

  • Donal K. Fellows

    • labels: --> 01. Bindings
    • assigned_to: nobody --> das
     
  • Donal K. Fellows

    • priority: 5 --> 6