# HG changeset patch # User wenzelm # Date 1400505788 -7200 # Node ID c914618feef8e28b3d70e0a35ad1fee78b9fc583 # Parent d926fc73b55425b8152dc8b2226c67ea3d4ca69f some adhoc event handling to unify L&F button focus behavior, e.g. Mac OS X vs. Nimbus; diff -r d926fc73b554 -r c914618feef8 src/Tools/jEdit/src/query_dockable.scala --- a/src/Tools/jEdit/src/query_dockable.scala Mon May 19 15:00:11 2014 +0200 +++ b/src/Tools/jEdit/src/query_dockable.scala Mon May 19 15:23:08 2014 +0200 @@ -251,7 +251,13 @@ private val apply_button = new Button("Apply") { tooltip = "Apply to current context" - reactions += { case ButtonClicked(_) => apply_query() } + listenTo(keys) + reactions += { + case ButtonClicked(_) => apply_query() + case evt @ KeyPressed(_, Key.Enter, 0, _) => + evt.peer.consume + apply_query() + } } private val control_panel = new Wrap_Panel(Wrap_Panel.Alignment.Right)()