Selecting text with the keyboard (Shift+Right)

Asked by Juhyeon

I've tried so many combinations of

keyUp(SHIFT), type(Key.RIGHT, Key.SHIFT), type(Key.RIGHT, KeyModifier.SHIFT)

and so on, but absolutely nothing will work. Other arrow keys and END also don't work in combination with SHIFT, they behave as if SHIFT isn't held.

A simple example:

App.focus("Word")
type(Key.RIGHT, KeyModifier.CTRL)

Works perfectly fine.

App.focus("Word")
type(Key.RIGHT, KeyModifier.SHIFT)

Does not work as it should.
Expected behaviour: Cursor moves to the right, letter is selected
What happens: Cursor moves to the right as if shift is not pressed. Letter is not selected.

Same thing with END.

App.focus("Word")
type(Key.END, KeyModifier.SHIFT)
Expected behaviour: Cursor moves to the end of the sentence, sentence is selected
What happens: Cursor moves to the end of the sentence as if shift is not pressed. Sentence is not selected.

Any way to get around this?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

what windows?
what Java?
what Sikuli?

Revision history for this message
Juhyeon (juhyeon) said :
#2

Win7, Java 8 (1.8.0), Sikuli 1.1.0.

Revision history for this message
Best masuo (masuo-ohara) said :
#3

I found a similar question .
https://answers.launchpad.net/sikuli/+question/256442

At NumLock key off situation, it work as expected.
(I tested on Windows7, Java 1.8.0, SikuliX1.1.0.)

Revision history for this message
Juhyeon (juhyeon) said :
#4

Thanks masuo, that solved my question.