Page MenuHome

Display key presses in 3d-view
Closed, ArchivedPublic


Project: Blender Extensions
Tracker: Py Scripts Release
Blender: 2.64
Python: 3.2
Script name: Screencast keys status tool
Wiki page:
Author(s): Paulo Gomes
Category: 3D View
SVN Download:
Status: Open

This script display the keys you press in the 3d-view. This is useful when doing screencast.

How to use:
After enabling the script a new panel shows up in the properties bar (N-key) of the 3d-view, called: "Display Keys Status"
Press "Start display" and all key presses are now displayed in the 3d-view.

Pos X, Pos Y: determine where the key presses are displayed
Size: font size of the displayed text
Mouse: enable/disable displaying mouse event (for instance pressing the right mouse button)

Event Timeline

Excellent Script - One Suggestion after using it for a few minutes. It does not display when you hit a button more then once. So, like R, R to go into free rotate mode just looks like you pressed R one time.

Version 0.3

Fixed script so it works correctly with the changes in the blf module.
Also added information for the add-ons window and did some general cleaning.

Great stuff! Updated for 2.54 (r32727) (attached)

Add a panel to the Properties panel in the Display tab:

- 'Screencast Keys Status' activates/deactivates script.
- 'Pos x' 'Pos y' Position of the text.
- 'Size' Size of the font.
- 'Mouse' Activates/Deactivates display of mouse events.

lots of copy/paste from Bartius Crouch's Index Visualiser script.

tried this one on blender 2.55.1, fails with the attched error

if it gets fixed we could talk about putting this in contrib/ ?

oh, also, wondering if this can be transformed so that it shows keypressed in the main info header and get keypresses from every possible area, not only from 3dview

the script is working now.

[canned response]

Hi, can you prepare a wiki page with a bit of a manual about how to
use this? It surely would help the review process :)



added wiki page

Version 0.6
Updated script for current version of SVN. Also implemented user requests from BlenderArtists. Script is now pep8 compliant.

Perhaps it's time to move to contrib?

ok. I tested it and found some weirdness but still it's ok to go in contrib if it's maintained

Luca: if you can reproduce any of the weirdness, please let me know.

Moved from Py Scripts Upload to Py Scripts Contrib

Moving from upload to contrib and assigning to myself.
Can re-assign to Paulo Gomes when he is back again.

Currently the script does not detect multiple modifier keys. For example, if you press CTRL + ALT + G to remove an object from a group it only displays "ALT + G". Is this fixable?

Jonathan Williamson: thanks for reporting, fixed in SVN (for download link, see above on this page).

Enable Add on
Save User Settings (CTRL U)
Start Display
New (CTRL N)
Start Display: Blender crash

Blender Win 7 64 bit r35798

Unfortunately this is a know issue and can't be fixed with the current python api.

You can read a little bit more on it at:

updated attatchment working in rev 36710

Brendon: did you copy the attachment from current contrib svn?
I'm a bit confused about why the attachment was updated, because the script is already in contrib svn (and kept up to date over there). I'll try to catch you on irc.

Since your script is now in bf-extensions\' svn (contrib|trunk) we have deleted the current attachments to avoid that end-users could reach this page and get the wrong version of your script.
Note that your script may have api changes or small maintenence changes applied in SVN.
Please retrieve your script from SVN before updating SVN to avoid mis-versioned scripts.

nice script ;) It is possible to show holded keys ? For example when you press ctrl for snaping or K for knife ? actualy pressed ctrl didn't shown at all, and Holded K with mouse, shows Kx(Number) and LEFTMOUSE separately.

Hi, moving to release.
This is a great tool for video tutorials & already widely used.
Updated Blender & Python versions in the tracker page.

Moved from Py Scripts Contrib to Py Scripts Release

hi, updated the script with min/max size values,reviewed & moved to release.

Here is a new version of the script:

it adds a Mouse&text grouped modus (with a visual boundingBox),
it lets the mouse and font be sized separately,
and the settings wil be stored along with the blend file now.

There are still following problems:

1.) MouseWheel is not supported

2.) sometimes mouse events are not received, for example:
- in edit mode press "g" (this gets reported, good)
- move the mouse for a spluit second (nothing reported, still good)
- left or right click (click is not reported)
It looks like the events just do not get passed to the addon.
I have no idea how to fix that.

3.) The dispaly still can get out of sight, when i am in mouse&text group mode
and place the mouse to the right side of the screen. I have an idea
how to get this fixed though.

committed updates by Gaia Clary
please see above for exsisting issues that could not be solved yet.

It should also show modifier keys alone like Shift Ctrl and Alt.
Currently it does not show Shift+Alt+RMB - it shows only RMB.

Nice work anyway!

I must complement:
Shift+Alt+RMB shows fine, when both a set to display text.
But when a mouse is set to display as an icon, Shift+Alt+RMB shows only as RMB.

When extruding or moving an object along an axis it would be helpful to log secondary key presses (like E X X or R Y); currently those don't get displayed on my system.

Additionally, it looks like in edit mode some key events get logged twice; when using S or E in edit mode the script always shows S x2 and E x2. This is using a laptop + external keyboard but I imagine that that setup wouldn't impact the script.

specs: Windows XP 32 bit, Blender 2.60rc, NVidia 9400m.

Thanks for the reports.
It's unfortunately impossible to display the secondary key presses (like E X X or R Y) , because we can't get access to them with the current python API.
I'll look into the other problems, but that will be for next week.

Thank you for your excellent work.

I am getting feedback from experienced students about the multiplier. The multiplier count sometimes increases inappropriately.


Hit [ T ] for tool shelf -- Display: "T"

Do some stuff. -- Display disappears (as expected).

Hit [ T ] to hide tool shelf -- Display: "Tx2"

Some users think I'm hitting T once to show shelf and twice to close it. This also happens with other keys.

It would be nice to have an option to turn off the multiplier and just report keys as they are tapped.


Would it be a solution to reset the multiplier count after the display appears?

Obviously I mean DISappear.
So there will still be a multiplier count if you press the same button rapidly, but once the display has disappeared the multiplier is reset and you start again at 1 if you press the same button after a few seconds.

I commented out the multiplier code (near line 420) on my local copy. That's good enough for me, for now.

Thanks -- it's really useful.

Due to changes to the api including the merging of bmesh, several addons are outdated.
Please, if you are the author of an addon check your script with blender revision 44256 or newer.
That is builds made After blender 2.62 official release.
I would ask that updates be made to your addon before the Blender 2.63 release.
6-8 weeks away.
This allows time for the api to become more exposed & bmesh to stablize furthur.
If you need help, drop into irc freenode #blenderpython or #blendercoders & feel welcome to ask questions.
At the time of 2.63 release, scripts that are not repaired or in active developement will have their tracker page marked "Closed"
this will not affect your links to the tracker, similar to closing scripts in 2.49b, the page will be still availible & can be re-opened.

Thanks for your understanding & patience during these Exciting Times.

bug report from codemanx
1. Enable an addon, which adds an operator (toggle) button to the properties panel - e.g. Screencast Keys
2. Open N panel e.g. in Default screen and click the toggle button (Screencast Keys > "Start display")
3. Change screen, e.g. to Animation and open N-panel again
4. Click toogle button again (Screencast Keys > "Stop display")
5. Blender crashes (if not, click the button once more)

Console message:
Fatal Python error: GC object already tracked --> apperently a problem in the c-code, not in the python script

Windows OS messages:
MS VC++ Runtime Error
APPCRASH blender.exe - module python32.dll

I'm having the same problem as Brendon. The plugin consistently crashes blender.

Also, it eats a lot of resources, taking up 100% of one of my CPUs when enabled.

Are there any plans to fix this very useful plugin?

the background box appears to draw in front of the text, when i put the opacity up on it to make it more visible regardless of what was behind it the background box just covered everything.

Hi, I recently met a sorf of "update" issue, please see this video: I hope I've made myself understood. FYI. Thanks!
Btw, same post also see:

This task was automatically closed as archived as part of migration, because it was determined to be no longer active.

The authoritative list of addons is on the wiki, we no longer have a report for each addon to track bugs and updates. Bugs can be reported individually and assigned to the addon developers. See the Add-ons (Community) project page for more information on the workflow.

Nobody (None) changed the task status from Unknown Status to Unknown Status.Mar 15 2010, 7:52 AM