Skip to main content
+ example script
Source Link
Edgar Bonet
  • 45.3k
  • 4
  • 42
  • 81

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.

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.

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.

Source Link
Edgar Bonet
  • 45.3k
  • 4
  • 42
  • 81

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.