From: Daniel A. S. <st...@ic...> - 2005-03-29 10:27:11
|
JC, On 29/03/2005, at 6:14, Jean-Claude Wippler wrote: > Sorry to bother you with this... I have a brief Q re Aqua Tk. > > Am trying to use F1..F9 for specific tasks in a little app I'm > experimenting with. Looks like F4 always pastes the clipboard in the > current focus area (and IIUC, F2 and F3 also behave like ^C and ^X). > I haven't been able to find these bindings anywhere, let alone turn > them off. Googling doesn't seem to help. > > Is there some trick I'm missing? this is caused by the [event add]s below from tk.tcl, to turn them off, you could use the corresponding [event delete] in your code. Cheers, Daniel -- ** Daniel A. Steffen ** "And now for something completely ** Dept. of Mathematics ** different" Monty Python ** Macquarie University ** <mailto:st...@ma...> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> #---------------------------------------------------------------------- # Define the set of common virtual events. #---------------------------------------------------------------------- switch [tk windowingsystem] { "x11" { event add <<Cut>> <Control-Key-x> <Key-F20> event add <<Copy>> <Control-Key-c> <Key-F16> event add <<Paste>> <Control-Key-v> <Key-F18> event add <<PasteSelection>> <ButtonRelease-2> event add <<Undo>> <Control-Key-z> event add <<Redo>> <Control-Key-Z> # Some OS's define a goofy (as in, not <Shift-Tab>) keysym # that is returned when the user presses <Shift-Tab>. In order for # tab traversal to work, we have to add these keysyms to the # PrevWindow event. # We use catch just in case the keysym isn't recognized. # This is needed for XFree86 systems catch { event add <<PrevWindow>> <ISO_Left_Tab> } # This seems to be correct on *some* HP systems. catch { event add <<PrevWindow>> <hpBackTab> } trace variable ::tk_strictMotif w ::tk::EventMotifBindings set ::tk_strictMotif $::tk_strictMotif } "win32" { event add <<Cut>> <Control-Key-x> <Shift-Key-Delete> event add <<Copy>> <Control-Key-c> <Control-Key-Insert> event add <<Paste>> <Control-Key-v> <Shift-Key-Insert> event add <<PasteSelection>> <ButtonRelease-2> event add <<Undo>> <Control-Key-z> event add <<Redo>> <Control-Key-y> } "aqua" { event add <<Cut>> <Command-Key-x> <Key-F2> event add <<Copy>> <Command-Key-c> <Key-F3> event add <<Paste>> <Command-Key-v> <Key-F4> event add <<PasteSelection>> <ButtonRelease-2> event add <<Clear>> <Clear> event add <<Undo>> <Command-Key-z> event add <<Redo>> <Command-Key-y> } "classic" { event add <<Cut>> <Control-Key-x> <Key-F2> event add <<Copy>> <Control-Key-c> <Key-F3> event add <<Paste>> <Control-Key-v> <Key-F4> event add <<PasteSelection>> <ButtonRelease-2> event add <<Clear>> <Clear> event add <<Undo>> <Control-Key-z> <Key-F1> event add <<Redo>> <Control-Key-Z> } } |