[TOOL] StreamKB onscreen keyboard

uberpwnzorz

New Member
Hi All,

I developed StreamKB so the community would have a free open source alternative to some other options. I originally made this for Starcraft II streaming but this will work well for any other game that has a Windowed-Fullscreen mode, especially since OBS allows for scaling when you window capture.

T6OPKiS.jpg


StreamKB is currently available in QWERTY and AZERTY formats, I'm willing to put together some others if I can obtain the keycodes/rawcodes I need to make them work properly.

Usability:
  • Right click pops up menu with color and size options.
  • Window can be dragged by clicking anywhere.
  • Clicking the buttons doesn't send any key presses to the screen.
  • Color and window position are saved whenever colors are changed or program is exited through the right click menu. Settings are saved in a StreamKB.settings file which can be deleted to reset to default.

OBS Tips:
  • This doesn't work in games while in FullScreen mode. You must use Windowed Fullscreen in order for this to work while streaming.
  • When using window capture, uncheck capture mouse cursor. Also try capture entire window if inner isn't working right.
  • While transparent colors work for StreamKB, OBS doesn't pick up the window properly when you're using window capture on a transparent window.
  • Aero must be enabled or other windows will appear on top of the keyboard when streaming.
  • To get this to show up with the proper window size in OBS, try opening up the color options menu before adding it for window capture.
    *Edit: This only seems to happen when using the jar version, this shouldn't be needed if you download the 1.1 exe file.

Download Info:
You can download the latest version at: https://sourceforge.net/projects/streamkb/
This requires JRE to run.

FYI: I'm new to publishing things like this, feel free to PM me if I'm not taking some proper steps or post here if you have suggestions.
While I'll be checking in here for feedback I initially posted this on TeamLiquid and I check there frequently for feedback.

dYm8vPA.png


Enjoy! :)

Edit: Just updated to version 1.2 on 06/10

Edit: Updated to version 1.3 on 06/15
Added Always On Top option for people who have Aero off.
Added DVORAK keyboard layout.

Patch Notes:
1.3 - Added Always On Top option
1.2 - Changed to new Keyboard hook to lower memory usage.
Reduced CPU required when holding down keys.
Fixed minor issue with color chooser.

1.1 - Updated to make it easier to update to different layouts

1.0 - First Release
 

zolia

Member
It's nice to see all people doing great for community, but there was already one viewtopic.php?f=22&t=3783 that can be customize, but more choise is better :).
Seem good you should ask Thonhot how he did to make him work in fullscreen mode.

Good tip for the password i think should put it in red and less big, but should put it on other software that do same, most people dont think of it.
 

uberpwnzorz

New Member
zolia said:
It's nice to see all people doing great for community, but there was already one viewtopic.php?f=22&t=3783 that can be customize, but more choise is better :).
Seem good you should ask Thonhot how he did to make him work in fullscreen mode.

Good tip for the password i think should put it in red and less big, but should put it on other software that do same, most people dont think of it.
I'm aware of thonhot's keyboard, I started working on mine around the same time he started on his but initially posted it on another site. I've been getting good feedback so I thought I should share with other communities. His has more keyboard layout options right now, I've been making separate builds for different layouts assuming people would only need the one that matched their keyboard. I also wanted to ensure that each layout would make efficient use of screen space for streaming. My goals were to take a minimalist approach so it wouldn't take up much of the screen, and to allow for easy color customization.

StreamKB is written in Java so it's more difficult to capture keystrokes in other programs, that's why full screen won't work with mine. If I teach myself how to translate this to C++ or something else that is native I might be able to get fullscreen to work, but that won't be happening any time soon. As it is this was learning experience for me, I basically taught myself how to do this while I was making it.

I just wanted the warning to be big, I've actually watched a pro gamer have to cut off his stream so he could change his passwords after using a different keyboard program. I guess I should put the warning in other places too.
 

lody

New Member
You could add a failsafe mechanism that detects if a user starts typing in a string (password etc) and turn off the display momentarily
 

zolia

Member
well when i stream now i m fine from password, because i got a special screen overlay when i'm out game, so the keyboard only apear when i play (and there are only keys i use in game that appear too), but i think lot of pro player dont think about password when they stream with it.

Java wont use more memory/cpu than how Thonhot is coded? (idk the other i guess is C++)?
 

uberpwnzorz

New Member
yea, the best solution for not typing passwords with the keyboard on the screen is to have a separate scene that you can switch to.

honestly i don't know, most of the memory/cpu use in mine is the initial load, mine takes about 50mb mostly because of the java environment. the part of my program that does the color change is very simple and that's all it does after the initial load. i haven't looked at his code but, the only real way to tell cpuwise would be to comment both of our code to write timestamps to file and compare them. most likely they'd be within 1/10000 or less of a second because of how similar keylisteners are.
 

ThoNohT

Developer
I'd be interested to see your code actually. Have you opensourced it or will it remain closed source?
In my case, the rendering is done by directx 9, the code can still be heavily optimized, at the moment it draws every key every frame. But I'm very new to direct3d programming, I'm using this project as a way to learn something about it.
 

uberpwnzorz

New Member
ThoNohT said:
I'd be interested to see your code actually. Have you opensourced it or will it remain closed source?
In my case, the rendering is done by directx 9, the code can still be heavily optimized, at the moment it draws every key every frame. But I'm very new to direct3d programming, I'm using this project as a way to learn something about it.
It's open source but I'm not using git right now, if you go to files there's a src folder.

I'm also using this to learn, which is another reason I kept it free. Since it uses java swing I just had to arrange buttons to look like a keyboard and all it does is change the background color of the right button when a key is pressed and changes it back when released. Hard part was getting a native keyboard hook so it would pick up keypresses when the window wasn't selected, I'm not capable of writing one at the moment but I was able to find other free open source ones to use. There aren't any that I know of right now that will hook in to directx to get keypresses from a fullscreen environment.

BTW I just updated to version 1.2 :)
 

ThoNohT

Developer
Mine doesn't really hook into direct x. It uses a win32 hook called low level keyboard hook, which basically returns all system-wide keypresses.
 

uberpwnzorz

New Member
ThoNohT said:
Mine doesn't really hook into direct x. It uses a win32 hook called low level keyboard hook, which basically returns all system-wide keypresses.
Weird, I'm using a "low level" keyboard hook that uses C++ libraries, I'm not sure why it won't pick up key presses in directx.

Edit: I actually just confirmed that the issue is the repaint command in java won't trigger when there's a directx application in control of the screen.
 

mudjunkie

New Member
Hey, awesome piece of software. It's a neat addition to a stream!

It would be great if it could capture mouse clicks too, just as two (or three, probably) keys as "MB1" or "LMB", "MMB" and "RMB", or something like that.

Thanks!
 

Herkkupala

New Member
I have been encountering a weird problem with the application.

Some info first:

Intel i5-4690K
Asus Z97-A
8GB DDR3 1866Mhz
Gigabyte GTX 760
Windows 10.

The application opened ONCE and that time it did not register any keypresses. After closing it, it hasn't started again no matter how many times I have re-downloaded it.

What could have caused this and how can I make it work properly?
 
Top