<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How do I reproduce [IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos&rsqb;&rsqb;] in ZBrush Python?]]></title><description><![CDATA[<p dir="auto"><strong>I’m trying to convert this ZScript behavior to ZBrush Python:</strong><br />
[IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos&rsqb;&rsqb;]</p>
<p dir="auto"><strong>My Python attempt is:</strong><br />
var = zbc.get_mouse_pos()<br />
zbc.press_key("SHIFT + CTRL", lambda: zbc.canvas_click(var[0], var[1]))</p>
<p dir="auto">I’ve also tried several variations of the shortcut string, but none of them work.</p>
<p dir="auto"><strong>What I already know:</strong></p>
<p dir="auto">zbc.canvas_click(var[0], var[1]) works by itself.<br />
The problem only starts when I try to combine it with zbc.press_key().</p>
<p dir="auto">I already have a workaround by using zbc.press("macro button with [IKeyPress, SHIFT + CTRL, [CanvasClick,[MouseHPos],[MouseVPos&rsqb;&rsqb;] inside").</p>
<p dir="auto"><strong>What works and what doesn't:</strong><br />
[Fails] zbc.press_key("CTRL+z")<br />
[Works] zbc.press_key("N", lambda: press("Document:New Document")) (don't know what "N" does)<br />
[Works] zbc.press_key("e", lambda: print("Scale mode enabled")) (don't know what "e" does)<br />
[Works] zbc.press_key("SHIFT+p", lambda: zbc.press("Tool:Subtool:MoveUp")) (correctly simulates moving subtool to the top, i had to add a key ("p") to the shift modifier for it to work)</p>
<p dir="auto"><strong>What i would like to have clarified:</strong><br />
Is there a supported Python equivalent to ctrl + shift click?<br />
If zbc.press_key() is the wrong tool, what is it actually doing internally?<br />
Does it simulate real keyboard state?<br />
Does it support modifier-only combinations like SHIFT+CTRL without a normal key?<br />
Is this expected to fail with canvas_click() specifically?<br />
In other words, does press_key() work only for certain commands, but not for canvas interaction?<br />
I’m trying to avoid guesses here. A concrete answer about what press_key() can and cannot do would help a lot.</p>
]]></description><link>http://developers.maxon.net/forum/topic/16405/how-do-i-reproduce-ikeypress-shift-ctrl-canvasclick-mousehpos-mousevpos-in-zbrush-python</link><generator>RSS for Node</generator><lastBuildDate>Sun, 03 May 2026 00:06:47 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16405.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Apr 2026 17:57:36 GMT</pubDate><ttl>60</ttl></channel></rss>