Comments (13)
Same on Windows 8 + AMD GPU.
from vispy.
Strange, for me it works fine. (Ubuntu Linux).
The docs seem pretty clear about this.
http://www.pyglet.org/doc/api/pyglet.window.Window-class.html#on_key_press
We just do text = chr(key)
in vispy/app/backends/pyglet.py
Can either of you have a look at this?
from vispy.
on_key_press is really about keycode while one_text will give you the actual letter:
http://www.pyglet.org/doc/api/pyglet.window.Window-class.html#on_text
On Aug 8, 2013, at 2:06 PM, Almar Klein [email protected] wrote:
Strange, for me it works fine. (Ubuntu Linux).
The docs seem pretty clear about this.
http://www.pyglet.org/doc/api/pyglet.window.Window-class.html#on_key_press
We just dotext = chr(key)
in vispy/app/backends/pyglet.pyCan either of you have a look at this?
Reply to this email directly or view it on GitHub:
#11 (comment)
from vispy.
Arg. Pyglet keeps being annoying. Should we try to combine the two events somehow? This requires some thought. Perhaps @lcampagn has a good idea how to handle this?
from vispy.
As I've said, I don't think it is always necessary to cover up the differences between backends. The point of having a pyglet backend is to accomodate developers who prefer to work with pyglet, not to allow backend-independent applications. So to me, the most straightforward approach is to add an on_text event to the pyglet backend.
from vispy.
But then, would not two Key events being generated for most keys being pressed?
from vispy.
Yes, but they could be made distinguishable. Or, a KeyEvent and a TextEvent might be generated. It seems that is how pyglet is designed to be used..
from vispy.
Creating a TextEvent class just for pyglet goes a bit too far IMO.
from vispy.
I think GLFW is doing the same (but is it is called key and char).
On Aug 9, 2013, at 2:35 PM, Almar Klein [email protected] wrote:
Creating a TextEvent class just for pyglet goes a bit too far IMO.
Reply to this email directly or view it on GitHub:
#11 (comment)
from vispy.
I think most application would do fine if we simply make on_text generate a second KeyEvent:
If e.g. an arrow key is pressed, only one event is generated (the same that would be generated now)
If e.g. the "a" is pressed, at first the on_key_press is fired, but we will set its text
attribute to an empty string. Then the second event (from on_text) will have the correct text attribute. The only situation (I think) where this goes wrong if a key event handler listens for character keys using event.key: for pyglet they would trigger twice.
from vispy.
I made a change to the pyglet backend:
1184c45
Let me know if this about fixes the problem.
from vispy.
Yep, works for me.
On Aug 12, 2013, at 10:51 AM, Almar Klein [email protected] wrote:
I made a change to the pyglet backend:
1184c45Let me know if this about fixes the problem.
Reply to this email directly or view it on GitHub:
#11 (comment)
from vispy.
Works for me too.
from vispy.
Related Issues (20)
- in (/vispy/visuals /surface_plot.py) line 129 HOT 2
- How to render canvas with original pixel values? HOT 13
- The case where the scan lines are parallel to the sides of the rectangle HOT 1
- Cannot find Quartz library on MacOS Sonoma HOT 18
- Issue with Image Clipping in Multiple Viewboxes HOT 3
- how can i disable the canvas border HOT 2
- No setter for some properties of Arrow or Line after instantiation HOT 3
- Question regarding datoviz, backends, gtk HOT 5
- destructive behaviour when lines overlap HOT 1
- Errorous behavior in Vispy.Visuals.Markers.set_data HOT 2
- grid solver constraint not working HOT 4
- Running vispy inside docker and not being able to access OpenGL drivers HOT 1
- SurfacePlotVisual.set_data cause vertex shader to perform unnecessary build HOT 3
- Looking for additional maintainers HOT 12
- vispy flickering on Windows with real time data HOT 12
- How to use a canvas decorator inside a custom class HOT 2
- How to change shortcut for camera Interaction in vispy HOT 2
- VisPy does not work properly if QtWebEngineWidgets is imported HOT 4
- Outdated Vispy version with Debian 12 package HOT 2
- Having problems with TextVisuals and InstancedMesh HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vispy.