user72701: I build a macro keyboard and one thing I do alot is add a set amount to numbers mostly in 3d modeling programs. I add and remove 0.25 and 0.125 all the time. I want to make a macro that copies selected text, adds or subtracts a value then pastes it back.
I known the simple copy and paste commands but how do I get my arduino program to grab that copied value?
Can this even be done?

user7508: You have to write an application for your PC that

reads a number from the clipboard
adds some constant
puts the result back in the clipboard
quits

Then you have to configure you desktop environment in order to have this
application launched from a keyboard shortcut.
Once you have done that, you can do the whole operation from a regular
keyboard: Ctrl-C + Launcher shortcut + Ctrl-V.
If you can do it from a regular keyboard, you can do it from the Arduino
emulating a regular keyboard.
Edit: The way you do the first two steps is very dependent on the OS
running on your PC. On Linux, for example, the mentioned “application”
can be a minimal shell script:
#!/bin/bash

x=$(xclip -o -selection clipboard)
xclip -i -selection clipboard <<< $(bc <<< "$x + 0.25")

These steps are, however, outside the scope of this site.

72701: <p>I build a macro keyboard and one thing I do alot is add a set amount to numbers mostly in 3d modeling programs. I add and remove 0.25 and 0.125 all the time. I want to make a macro that copies selected text, adds or subtracts a value then pastes it back.</p>
<p>I known the simple copy and paste commands but how do I get my arduino program to grab that copied value?</p>
<p>Can this even be done?</p>
 7508: <p>You have to write an application for your PC that</p>
<ul>
<li>reads a number from the clipboard</li>
<li>adds some constant</li>
<li>puts the result back in the clipboard</li>
<li>quits</li>
</ul>
<p>Then you have to configure you desktop environment in order to have this
application launched from a keyboard shortcut.</p>
<p>Once you have done that, you can do the whole operation from a regular
keyboard: Ctrl-C + Launcher shortcut + Ctrl-V.</p>
<p>If you can do it from a regular keyboard, you can do it from the Arduino
emulating a regular keyboard.</p>
<p><strong>Edit</strong>: The way you do the first two steps is very dependent on the OS
running on your PC. On Linux, for example, the mentioned “application”
can be a minimal shell script:</p>
<pre class="lang-sh prettyprint-override"><code>#!/bin/bash

x=$(xclip -o -selection clipboard)
xclip -i -selection clipboard &lt;&lt;&lt; $(bc &lt;&lt;&lt; &quot;$x + 0.25&quot;)
</code></pre>
<p>These steps are, however, outside the scope of this site.</p>
