Question / Help Change image based on keystate

LegacyCode

New Member
I've been looking into a way to change images based on a certain key being held down like the example image without having to use screen capture on something, I've tried using javascript with the clr browser plugin, While it works fine in the browser it doesn't seem detect the key presses when using it with the clr browser plugin.

Rct4lKj.png


This was some test javascript i got somewhere from the internet,
HTML:
<!DOCTYPE html>
<html>
<head>

<title> - demo</title>
<script type="text/javascript">
        document.onkeydown = ShowKeyCode;
        function ShowKeyCode(evt) {
            document.getElementById("imgid").src="2.png";
        }
    </script>
</head>
<body>
<img id="imgid" src="1.png">
</body>
</html>

Has anyone done something similar and came up with a solution for this?
 

Jack0r

The Helping Squad
The OBS image source has the option "Check for file changes". If you create an auto hotkey script that changes the image file on your hdd as soon as you press the button, it could work.
 
Top