← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #179000]: How to I type numpad decimal key

 

Question #179000 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/179000

    Status: Answered => Open

vikramsjn is still having a problem:
I will try rephrase the question in a long, and short way.
Also want to inform that I am Windows XP.

The short question is/are - 
Which keyboard key does Key.SEPARATOR corresponds to? Or how can the Key.SEPARATOR be used?

Or, as I stated previously
The numeric keypad, in its last row has: 0/Ins, ./Del, Enter
I am able to generate keypress for each of these, except for the Decimal (and thats when the Num lock is On)

I am certain that the virtual key code for this Decimal (when Num lock
is On) is 110 (if that is of any use).


The long way question is...

I tried to write sikuli commands to particularly generate numeric key
pad's key presses.

The sikuli key constant documentation states following key constants :

> numpad keys
> NUM0, NUM1, NUM2, NUM3, NUM4, NUM5, NUM6, NUM7, NUM8, NUM9, SEPARATOR, ADD, MINUS, MULTIPLY, DIVIDE

So I assumed that Key.SEPARATOR is for the Decimal key on the numeric
keypad.

When I write following code

keyDown(Key.NUM1); keyUp(Key.NUM1)
keyDown(Key.NUM2); keyUp(Key.NUM2)
keyDown(Key.MINUS); keyUp(Key.MINUS)
keyDown(Key.NUM2); keyUp(Key.NUM2)

the text typed by sikuli is: 
12-2

but when I use the following


keyDown(Key.NUM1); keyUp(Key.NUM1)
keyDown(Key.NUM2); keyUp(Key.NUM2)
keyDown(Key.MINUS); keyUp(Key.MINUS)
keyDown(Key.NUM1); keyUp(Key.NUM1)
keyDown(Key.SEPARATOR); keyUp(Key.SEPARATOR)
keyDown(Key.NUM2); keyUp(Key.NUM2)

I was expecting to get:
12-1.2

but instead got:
12-12

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.