Skip to main content
2 of 2
added 65 characters in body; edited tags
Kuba
  • 138.9k
  • 13
  • 297
  • 803

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 that

DialogInput is not currently supported within preemptive evaluations

whenever I call the keyboard shortcut.

Ranza
  • 1.2k
  • 9
  • 22