sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #57732
[Bug 1947580] Re: Key.isLockOn() not detecting state on Linux
thanks for the pointer.
will check and fix in 2.0.6 if possible
** Changed in: sikuli
Status: New => In Progress
** Changed in: sikuli
Importance: Undecided => Medium
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 2.0.6
** Summary changed:
- Key.isLockOn() not detecting state on Linux
+ [2.0.x] Linux: Key.isLockOn() not detecting state
** Description changed:
+ tracked on Github: https://github.com/RaiMan/SikuliX1/issues/392
+ ---------------------------------------------------------------
+
Trying to detect if the NUM_LOCK key is on at the start of the script.
Using Key.isLockOn() does not seem to work on Linux but does work on
Windows. Using Sikuli 2.0.4.
Linux:
Settings.isLinux(): True
Key.isLockOn(Key.NUM_LOCK): False
Windows:
Settings.isLinux(): False
Key.isLockOn(Key.NUM_LOCK): True
Using the following workaround seems to work on both platforms:
import java.awt.Toolkit as TK;
import java.awt.event.KeyEvent as KE;
numIsOn = TK.getDefaultToolkit().getLockingKeyState(KE.VK_NUM_LOCK);
Linux:
Settings.isLinux(): True
numIsOn is: True
Windows:
Settings.isLinux(): False
numIsOn is: True
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to SikuliX.
https://bugs.launchpad.net/bugs/1947580
Title:
[2.0.x] Linux: Key.isLockOn() not detecting state
Status in SikuliX:
In Progress
Bug description:
tracked on Github: https://github.com/RaiMan/SikuliX1/issues/392
---------------------------------------------------------------
Trying to detect if the NUM_LOCK key is on at the start of the script.
Using Key.isLockOn() does not seem to work on Linux but does work on
Windows. Using Sikuli 2.0.4.
Linux:
Settings.isLinux(): True
Key.isLockOn(Key.NUM_LOCK): False
Windows:
Settings.isLinux(): False
Key.isLockOn(Key.NUM_LOCK): True
Using the following workaround seems to work on both platforms:
import java.awt.Toolkit as TK;
import java.awt.event.KeyEvent as KE;
numIsOn = TK.getDefaultToolkit().getLockingKeyState(KE.VK_NUM_LOCK);
Linux:
Settings.isLinux(): True
numIsOn is: True
Windows:
Settings.isLinux(): False
numIsOn is: True
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1947580/+subscriptions
References