Bug 66802

Summary: [bug] editor client cannot select text with shift+arrow key
Product: Wayland Reporter: Brian Lovin <brian.j.lovin>
Component: westonAssignee: Wayland bug list <wayland-bugs>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Brian Lovin 2013-07-10 22:07:45 UTC
System Environment:
--------------------------
Distro: Fedora 17
Arch: x86_64
wayland (HEAD) 1.1.91-0-g3f3671e
fontconfig (master) heads/master-0-gcbf06d7
drm (HEAD) libdrm-2.4.45-0-g63aeae1
mesa (9.1) heads/9.1-0-g26f802d
libxkbcommon (HEAD) xkbcommon-0.3.0-0-g27a1176
pixman (HEAD) pixman-0.30.0-0-g41daf50
cairo (HEAD) 1.12.14-0-g0dac37c
weston (HEAD) 1.1.91-0-g46cb4a9

Detailed Description:
-----------------------------
Place cursor somewhere on the text in the `Entry` textbox and on the hardware keyboard, press Shift+<Arrow Key>. This should select text but does not.

Additionally, pressing Ctrl+<key> or Alt+<key> on the hardware keyboard will continue to print <key>

Steps to Reproduce:
----------------------------
1. start weston under X11 or DRM mode
2. ./editor
3. Place cursor within the text in the `Editor` box
4. Press Shift+<Arrow Key> on the hardware keyboard to attempt to select some text
5. Observe that no text is selected.
6. Press Ctrl or Alt+key and observe that <key> is still printed.

These aren't huge issues, but are inconsistent with how other applications behave.
Comment 1 Rob Bradford 2013-07-11 15:00:13 UTC
Patch to fix posted to the list.
Comment 2 U. Artie Eoff 2013-07-12 20:02:24 UTC
(In reply to comment #1)
> Patch to fix posted to the list.

To be clear, this patch addresses the <shift>+<arrow> case only... not the <ctrl> case that was sneaked into the description.
Comment 3 Kristian Høgsberg 2013-07-13 02:38:38 UTC
commit 0be41b739b2af9ea755019bea3ce67cd9443f4b5
Author: Rob Bradford <rob@linux.intel.com>
Date:   Thu Jul 11 16:00:00 2013 +0100

    editor: Support shift-left/right for selecting text
    
    If the shift modifier is active then we don't make the cursor and the
    anchor the same and as a result we develop a selection in the direction
    that the arrow key gets pressed in.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=66802

Closing this one regardless of the Ctrl-a etc issue.  editor isn't meant to be a full featured entry widget, and there are many other things we could fix: home/end doesn't work and of course shift-home/end doesn't work, ctrl-arrows should move by word, shift-ctrl-pointer select by word etc.  It serves its purpose of exercising the IM integration however.
Comment 4 Joe Konno 2013-07-22 16:43:22 UTC
Verified:
  1. start weston under X11 or DRM mode
  2. ./editor
  3. Place cursor within the text in the `Editor` box
  4. Press Shift+<Arrow Key> on the hardware keyboard to attempt to select some text

Acknowledge comment 3 bit about no intent to support other modifier + key combinations in the toy editor, so disregarding for purposes of verification.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.