How to implement a hotkey driven textbox that can run shell commands


I’d like to implement a simple textbox that I can call up anywhere on the screen with a hotkey. When I type a command into the textbox and hit enter, I’d like it to execute that command as if it were from a shell.

I’ve attempted this using 2 methods:

  1. An FvwmScript with a TextField Widget
  2. an FvwmForm implementation

The issue I’m having with 1. is that I’m unable to execute the text that is grabbed from the TextField using GetTitle.

The issue I’m having with 2. is that I don’t want a button but it seems as though it is built into FvwmForm. Also, I haven’t gotten Escape to close the FwvmForm yet.

Any help with choosing a method and overcoming my obstacles?

Implementation 1.

WindowTitle	{Run}
WindowSize	360 40
WindowPosition  0 170

Widget 1
 Size		360 20
 Position	0 0
 Type		TextField
 Title		{xterm}
 Case message of
 SingleClic :
  Set $Text = (GetTitle 1)
  Do {Exec $Text}

Implementation 2.

DestroyModuleConfig FvwmForm-Input: *
*FvwmForm-Input: WarpPointer
*FvwmForm-Input: Input Input 20 ""
*FvwmForm-Input: Button quit "" ^M
*FvwmForm-Input: Command Exec exec $(Input)

Thanks in advance,