KeyModifier.SHIFT not working in Sikuli

≯℡__Kan透↙ 提交于 2019-12-25 04:17:18

问题


I am new to Sikuli. I need to do Ctrl+Shift+Down in Sikuli.

I have tried:

type(Key.DOWN, KeyModifier.SHIFT + KeyModifier.CTRL) and type(Key.DOWN, KeyModifier.SHIFT|KeyModifier.CTRL)

but none of them works.Both produce the same effect as pressing Ctrl+Down.

Please help.


回答1:


Due to some bug, Shift combinations do not work if NumLock is on. The solution I used was to toggle it using:

type(Key.NUM_LOCK)

I found the answer here: https://answers.launchpad.net/sikuli/+question/272223




回答2:


How about this:

# Push down keys.
keyDown(Key.CTRL)
keyDown(Key.SHIFT)

type(Key.DOWN)

# Release keys. 
keyUp()



回答3:


Try this:

type(Key.DOWN, KeyModifier.SHIFT,  KeyModifier.CTRL) 

Pay attention that i only use "," not "+".



来源:https://stackoverflow.com/questions/39951920/keymodifier-shift-not-working-in-sikuli

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!