Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!earth.cchem.berkeley.edu!garys From: garys@earth.cchem.berkeley.edu (Gary Shea) Newsgroups: comp.windows.x Subject: accelerator problem Message-ID: <30414@ucbvax.BERKELEY.EDU> Date: 5 Aug 89 09:47:06 GMT Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: garys@earth.cchem.berkeley.edu (Gary Shea) Distribution: usa Organization: U.C. Berkeley Dep't of Chemistry Lines: 30 I am using the Dialog widget as a simple prompt for a file name, with a "Confirm" button for the user to press when the filename is right. I'd like pressing Return within the prompt string (the Dialog widget's "value" Text widget child) to be equivalent to pressing the "Confirm" button. The problem is that if the Text widget has an action in its translation table for the Return key, it will not allow the accelerator to override it, i.e. the following does not work: xf*value.translations: #replace\n\ CtrlU: beginning-of-line() kill-to-end-of-line()\n\ CtrlH: delete-previous-character()\n\ : insert-char() xf*confirm.accelerators: #override \n\ Return: set() notify() unset() If I remove the ": insert-char()" part of the Text widget's translation table, then the accelerator works. The only "solution" I have found is to individually place each possible filename character in the translation table for the Text widget (blecch): a: insert-char() b: insert-char() etc. Is this a bug, have i missed something in ye olde FM, is there A Better Way? TIA... gary