Skip to main content
1 of 2
Ranza
  • 1.2k
  • 9
  • 22

How do I run DialogInput and SystemDialogInput by keyboard shortcut?

I have tried modifying KeyEventTranslations.tr with code:

Item[KeyEvent["r", Modifiers -> {Control}], FrontEndExecute @ Module[{p ,ret}, DialogInput[{ListPicker[Dynamic[p],{"one", "two"}], DefaultButton[DialogReturn[ret = p]]}] ], MenuEvaluator -> Automatic, Method -> "Queued" ], 

but it complains DialogInput is not currently supported within preemptive evaluations whenever I call the keyboard shortcut.

Ranza
  • 1.2k
  • 9
  • 22