Re: [dev] [dmenu] Potential bug in dmenu Ctrl+Enter handling

From: <noname_AT_inventati.org>
Date: Sun, 12 Apr 2015 18:32:13 +0000

On Sun, Apr 12, 2015 at 11:18:02AM -0700, Eric Pruitt wrote:
> While looking at the dmenu source code to make a patch for it, I noticed
> this conditional on line 371: "if(!(ev->state & ControlMask))". It looks
> as though pressing Ctrl+(Shift)+Enter is supposed to print the current
> selection to stdout without terminating dmenu, but pressing
> Ctrl+(Shift)+Enter doesn't do anything; is this a bug or am I misreading
> the code? I am using a standard US keyboard layout with
> LANG=en_US.UTF-8.

The code that actually prints something is
  puts((sel && !(ev->state & ShiftMask)) ? sel->text : text);

If you hold Shift, it prints the text you have typed ('text'), not the
selection.

If you hold Ctrl, it does not terminate.

If you hold both Shift and Ctrl, it should at least print a newline.
Received on Sun Apr 12 2015 - 20:32:13 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 12 2015 - 20:36:08 CEST