I know certain applications already exist that do just this, display your keyboard on-screen. And even more probably. However, so far I have found none that were both free and easy to use. That's where this program came in, I made it to be free and easy to use, without any fancy graphics, and easily capturable (possibly with chroma key). Furthermore, it's very customizable.
Rewrite version: v0.3.0
Download from: https://github.com/ThoNohT/NohBoard/releases
Current version: v0.17b
Download from: https://sourceforge.net/projects/nohboard/
GitHub repository: https://github.com/ThoNohT/NohBoard
Note: when updating to v0.5b or higher from a lower version, it is best to remove all .kb files first (except perhaps for any home-made ones, they will need to have KBVersion updated to 3, and be adapted to the new format (see Keyboard file history for more info)).
Use: download and unpack, run NohBoard.exe.
By right clicking anywhere on the main window, you get the ability to open a settings dialog. In this settings dialog, the colors for the keyboard can be changed.
Furthermore, you can select which keyboard layout file should be used. So far, I have modeled the us international keyboard and some variations of it. One extra layout is made, called game_keys1.kb. This layout contains only the most basic keys used for gaming, this by itself might lack some keys, but it serves as an example of all the different things that are possible by making custom keyboard layouts.
Note that changing keyboard layouts requires a restart of the program.
Capturing NohBoard is best done with Window Capture.
Game Capture works too. However, there is a strange artifact where OBS will incorrectly detect the borders, they will be a lot larger than the actual image. It works normally for the rest, resizing and cropping works as if you were changing it from the edge of the image. Because of this, Window Capture is the preferred method.
As of version 0.9 of OBS-Studio, filters will be supported on all sources. Also, Game Capture does not have the weird artifact that the original OBS has with Game Capture on NohBoard. Therefore, the recommended way for OBS-Studio to capture NohBoard is using Game Capture. You can then add a Color Key filter to filter out the background if desired. The added benefit of Game Capture is that it does not have the bug where it will not show up in window capture when a full-screen game is started in some cases.
Note that enabling the scroll counter has to be done in the settings file for now. I might add a ui for this later. The following lines need to be edited:
scrollCounter 1 <- This enables the counter
scrollHold 1000 <- Holding a bit longer is sensible for the counter so it doesnt instantly reset.
- Nohboard might not be capturable in all cases. Some fullscreen games either prevent NohBoard from updating, or prevent OBS from capturing more frames on NohBoard (this is what I'm suspecting). I have so far been unable to fix this.
Keyboard layout file
Feel free to create (and submit) more layout files if you feel like making some. Below is an explanation of how the keyboard layout file works:
If you want any keyboard layout file to be made for you, please submit a picture of it as an example, and I will try and create it for you.General information
The first four lines define some general information about the keyboard file, each line is explained below:
- KBVersion - if NohBoard ever requires a different format, this number will be incremented, shows compatibilty information
- width - specifies the width of the main window in pixels
- height - specifies the height of the main window in pixels
- nKeysDefined - specifies the number of keys that are defined in the rest of the file
- category - specifies the the category the keyboard file should be filed under in the settings dialog
Then, for every key one line is added defining where to put it and what text it should have, the syntax is as follows:
These parameters all mean:
- key - Simply the word key
- keyCode - The keycode of the key (you can look them up in the existing layout files)
- x - The horizontal location (from left) in pixels
- y - The vertical location (from the top) in pixels
- width - The width of the key in pixels
- height - The height of the key in pixels
- NormalText - The text that should be displayed when Shift or Caps Lock is not pressed
- ShiftText - The text that should be displayed when Shift (or Caps Lock) is pressed (may be the same)
- ChangeOnCaps - 1 if the ShiftText should be shown when Caps Lock is enabled, 0 otherwise (numbers have this disabled, letters have this enabled)
- SmallFont - 1 if the text on the button should be drawn in a smaller font, 0 otherwise (generally, buttons with 1 character have this disabled, buttons with more characters have it enabled)
One exception is the key 1028. This key is used to display a circle showing the mouse speed. It has the following parameters:Note that if this key is defined at the end of the file, this is enough. If not, all keys defined after it will get messed up and loading will fail, so then the following layout is recommended, just padding all required parameters with 0s:Example
And here is the game_keys1.kb file as an example, showing how these lines are adapted
Special charactersCodeKBVersion 2 width 409 height 233 nKeysDefined 12 category Games key 37 221 53 43 43 %left% %left% 0 1 key 38 265 9 43 43 %up% %up% 0 1 key 39 309 53 43 43 %right% %right% 0 1 key 40 265 53 43 43 %down% %down% 0 1 key 65 9 53 43 43 a A 1 0 key 68 97 53 43 43 d D 1 0 key 83 53 53 43 43 s S 1 0 key 87 41 9 43 43 w W 1 0 key 160 9 107 100 43 %shift% %shift% 0 0 key 162 9 151 65 43 Ctrl Ctrl 0 1 key 164 75 151 56 43 Alt Alt 0 1 key 32 132 151 262 43 %0% %0% 0
For now, unicode files cannot be read. Therefore, some compatibility workaround has been added for making special characters.
They can be made by placing combinations of characters between %% signs.
For example, %'e% makes è, %e'% makes é, similarly for all vowels. If you need any of these, you can try if you can find the code for it. I might update this later with a full list. If you can't find it, or it doesn't exist, feel free to ask me to add it.
Two important ones are:
A space (" ") is %20%
An empty string (for on the space key for example) is %0%
Some more examples:
%ae%, %oe%, %^e%, %~e%, %,c%, etc...
There are some keycodes defined that do not directly map to keyboard keycodes, these are all above 1024, and are defined in the list below:
- 1025 - Numpad Enter key
- 1026 - Left mouse button
- 1027 - Right mouse button
- 1028 - Mouse speed widget
- 1029 - Scroll up
- 1030 - Scroll down
- 1031 - Scroll right
- 1032 - Scroll left
- 1033 - Middle mouse button
- 1034 - First mouse X-button
- 1035 - Second mouse X-button
Keyboard file history
Below follows some information about adapting your custom keyboards to newer formats.
1 (NohBoard v0.1b)
2 (NohBoard v0.4b)
No changes to the contents, version number was increased due to a drastic renaming of the keyboard filesnames.
3 (NohBoard v0.5b)
category property added to the headers, add this to specify under which category the layout file should be filed.
SmallFont property added to keys, add a 0 or a 1 behind every key definition in keyboard files < KBVersion 3.
Where 1 indicates the text for this button should be drawn in a small font, 0 indicates the normal, bigger font should be used.
Expect more changes in the future, feature requests and bug reports are welcome!v 0.17b
- Added button outlines (Michal Mitter).
- Added a new keyboard file us_intl_surfandhop.kb by Kristopher Henry Kram.
- Added a mouse sensitivity option.
- Added a new keyboard file game_fps1_mm.kb.
- Added separate colors for the mouse speed indicator.
- Added a gradient between the two colors for the mouse speed indicator.
- Fixed a small graphical glitch with the mouse speed indicator.
- Added a scroll counter (YaLTeR).
- Added support for X mouse keys (side keys), middle mouse key, scroll wheel (both vertical and horizontal).
- Altered mouseAll.kb to demonstrate all new buttons.
- Added two extra .kb files with FPS layouts incorporating the vertical scroll and middle button.
- Two extra .kb files with mouse movement tracking.
- Added the option to trap the keyboard and/or mouse input.
- Added mouse speed tracker
- Two extra game .kb file for The Binding of Isaac and DOTA.
- Two .kb files to showcase mouse movement tracking.
- Fix cleanup always removing special keys and mouse buttons.
- One extra .kb file with wsad and mouse buttons.
- Changed pressed key storage from llist to std::vector.
- Added experimental pressed key cleanup code.
- Changed se*.kb to scandi*.kb.
- Added numpad/arrow keys layouts.
- Added Swedish keyboard layouts.
- Fixed a crash caused by removing items from an empty linked list.
- Fixed showing only one keypress at a time.
- Fixed actually performing unhooking code when closing.
- Fixed kb file version check when entering settings dialog to not crash.
- Improved message loop reaction speed.
- Reduced critical section time for render thread.
- Fixed a mouse hook bug.
- Made mouse hook optional.
- Disabled mouse hook when no mouse keys defined in the .kb file.
- Added a separate font color for pressed buttons.
- Added support for a large and small font, font size switch per button => push KBVersion to 3.
- Category added to KBFile, allowing grouping in settings window => push KBVersion to 3.
- Bug fixed where unallocated memory was used to store and check pressed keys, now uses a linked list.
- Extra controls for font name, size and width added to the settings window.
- Fixed a memory leak due to not cleaning up fonts in Direct3d.
- Added mouse click detection.
- game_keys1.kb updated to showcase mouse buttons.
- Fixed a race condition? Due to mouse click detection.
- Make bright color texts readable in settings by changing to a dark background.
- AZERTY layouts added, as well as some user contributed special layouts.
- Extra character conversions, required for AZERTY added.
- Keyboard layouts names changed somewhat, layout files now have version 2. It is recommended to delete the old .kb files before updating to this version.
- Display during full screen games fixed. Sadly, at the cost of Windows XP compatibility.
- German keyboard layouts added.
- Extra character conversions, required for german layout added.
- Lots of extra configuration options in the config file - still need to be added to the settings menu.
- Multiple key definitions for the same keycode possible (allows for custom shaped keys, most notably the Return key).
- Fixed a memory leak.
- Hopefully fixed NohBoard process staying active after closing.
- First version.
Believe it or not, but people are writing tools for NohBoard, below is a listing of tools I know of and have tested:
- NohboardHelper: Allows you to create keyboard layouts using a graphical interface: https://github.com/Shamus03/NohBoardHelper/releases
Free NohBoard ReWrite beta v0.3.1
A keyboard visualizer