Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
, 2010 10:57 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Keypress broken since rev 11749 Hi Robert, I find some time to dig into this. And here are my observations ( I am working with Vivien's submission, with osgviewerMFC ) I put break points in GraphicsWindowWin32

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Jean-Sébastien Guay
Hi Brad, Robert- One issue with including both the translated and untranslated keys in the event is that there is not a one to one mapping. In windows sometimes 3 key presses will translate to one WM_CHAR (translated key) message and they don’t even need to be pressed at the same time (in the

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
] Keypress broken since rev 11749 Hi Brad, Robert- One issue with including both the translated and untranslated keys in the event is that there is not a one to one mapping. In windows sometimes 3 key presses will translate to one WM_CHAR (translated key) message and they don’t even need

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
Hi Brad, did you tried my change with adding the new extra line in GraphicsWindowWin32.cpp ? I think it will fix it. This way the key that was being translated to WM_CHAR will be passed as WM_KEYDOWN as well -Nick On Mon, Sep 20, 2010 at 5:51 PM, Jean-Sébastien Guay

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
] On Behalf Of Trajce (Nick) Nikolov Sent: Monday, September 20, 2010 10:03 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Keypress broken since rev 11749 Hi Brad, did you tried my change with adding the new extra line in GraphicsWindowWin32.cpp ? I think it will fix it. This way

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
(Nick) Nikolov *Sent:* Friday, September 17, 2010 10:57 AM *To:* osg-users@lists.openscenegraph.org *Subject:* Re: [osg-users] Keypress broken since rev 11749 Hi Robert, I find some time to dig into this. And here are my observations ( I am working with Vivien's submission

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Trajce (Nick) Nikolov Sent: Monday, September 20, 2010 11:06 AM To: OpenSceneGraph Users Subject: Re: [osg-users] Keypress broken since rev 11749 Hi Brad, Dialogs in MFC do not capture/receive the WM_CHAR message

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
*From:* osg-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Trajce (Nick) Nikolov *Sent:* Monday, September 20, 2010 11:06 AM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Keypress broken since rev 11749 Hi Brad

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
...@lists.openscenegraph.org] *On Behalf Of *Trajce (Nick) Nikolov *Sent:* Friday, September 17, 2010 10:57 AM *To:* osg-users@lists.openscenegraph.org *Subject:* Re: [osg-users] Keypress broken since rev 11749 Hi Robert, I find some time to dig into this. And here are my observations ( I am working

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Jean-Sébastien Guay
Hi Brad, JS- However I am wary of the issue where the WM_KEYDOWN is received and WM_CHAR is not (as in my case). In this case how do you handle what you are proposing? I didn't think at all of implementation issues, I was just thinking high level - modifying the existing events to try and

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
) Nikolov Sent: Monday, September 20, 2010 12:15 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Keypress broken since rev 11749 Hi again Brad, http://msdn.microsoft.com/en-us/library/619z63f5(VS.80).aspx note the Note. This makes me think you are using older MFC that is not doing

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
-users-boun...@lists.openscenegraph.org [mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Trajce (Nick) Nikolov *Sent:* Monday, September 20, 2010 12:15 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Keypress broken since rev 11749 Hi again Brad, http

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Brad Huber
Nick, Yes. -Brad From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Trajce (Nick) Nikolov Sent: Monday, September 20, 2010 2:23 PM To: OpenSceneGraph Users Subject: Re: [osg-users] Keypress broken since rev 11749 Hi

Re: [osg-users] Keypress broken since rev 11749

2010-09-20 Thread Trajce (Nick) Nikolov
[mailto: osg-users-boun...@lists.openscenegraph.org] *On Behalf Of *Trajce (Nick) Nikolov *Sent:* Monday, September 20, 2010 2:23 PM *To:* OpenSceneGraph Users *Subject:* Re: [osg-users] Keypress broken since rev 11749 Hi Brad, VS 8.0. Is that 2005? -Nick On Mon, Sep 20, 2010

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Robert Osfield
HI Brad, JS, Vivien and Nick, I'm not clear on what solution should be used going forward. The GraphicsWindowWin32.cpp code had been in play for a few years without problems being reported on this topic and to get a report or new problem after merging Vivien's changes make me concerned that we

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Vivien Delage
Hi Robert, I would agree with revert the code for now if it causes trouble. I think handling it on the GUIEventAdapter would indeed solve the problem. Here is a possible solution: - add a new EventType in GUIEventAdapter. It could be called KEYENTERED. This event would return the translated

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Robert Osfield
HI Vivien, The OSG already passes back translated keys, or at least that's the current intention. Having some keyboard events pass by translated, and other events pass back untranslated key is a recipe for confusion. It would also complicate user code substantially as event handlers would need

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Robert Osfield
Hi All, I have now revert Vivien's changes for the 2.9.9 as I don't want to risk regressions. I see this as an open topic still though, the problem that Vivien's was tackling still needs addressing. I'm no Windows hack so I'll half to defer to members of the community to work out a viable

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Jean-Sébastien Guay
Hi Robert, I'm not clear on what solution should be used going forward. The GraphicsWindowWin32.cpp code had been in play for a few years without problems being reported on this topic and to get a report or new problem after merging Vivien's changes make me concerned that we may have broken

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Trajce (Nick) Nikolov
Hi, the code from 11749 works just great with the latest osgviewerMFC. If this revision fixes issues for Vivien, I would put again his changes, there are no regression. I just give it a shot to make sure it does work. I think Brad can really rely on this example as a guide how to implement his

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Robert Osfield
Hi Vivien, JS, Nick et.al, I'm not really happy with the technique that Vivien took, eating a key down till a WM_CHAR occurs then dispatching one seems rather convoluted and with extra complication comes the danger of bugs being introduced as the code evolves, and obviously also forces the app to

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Trajce (Nick) Nikolov
Hi Robert, I actually like the idea of having osg working with dead keys thus being capable of handling language specific characters (you can type your text in osgWidget::Input in your natural language). I think this is very good feature, what Vivien has implemented. On the other side I totally

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Robert Osfield
Hi Nick, On Fri, Sep 17, 2010 at 4:45 PM, Trajce (Nick) Nikolov nikolov.tra...@gmail.com wrote: but Brad is the only one so far reporting issues One user reporting problems when the code has only been checked in for a week, this really isn't a good sign and why I've reverted the code. I

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Vivien Delage
Hi guys, I understand you Robert. I have no problem with reverting the code for now if this causes issues for other people. I will go and experiment a bit more on how to fix the dead key problem. Maybe I can find a solution which is not using the WM_CHAR message. I will let you know how it

Re: [osg-users] Keypress broken since rev 11749

2010-09-17 Thread Trajce (Nick) Nikolov
Hi Robert, I find some time to dig into this. And here are my observations ( I am working with Vivien's submission, with osgviewerMFC ) I put break points in GraphicsWindowWin32.cpp: Line: 2476 case WM_KEYDOWN: case WM_SYSKEYDOWN : {

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Brad Huber
To: OpenSceneGraph Users Subject: Re: [osg-users] Keypress broken since rev 11749 Hi Brad, It appears that with the changes to GraphicsWindowWin32.cpp at rev 11749 that keypress does not get called when one hits a “non special” key (eg one of the letter keys). If I understand correctly, non-special

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Jean-Sébastien Guay
Hello Brad, A different question, is why is the code written this way? I mean as I understand in windows you get a WM_KEYDOWN msg for all keys and then if it is a character you later get a WM_CHAR (possible multiple depending on key repeat?) and then when the user releases the key you get a

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Vivien Delage
Hi Brad, Hi JS, I am the author of this change. I did it in order to fix an issue with dead keys that were not handled correctly. Dead keys are used for key combination. For example in French keyboard pressing '^' key then after that 'u' key should result in the character 'û'. This was not

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Jean-Sébastien Guay
Hi Vivien, Thanks for replying, it's good to know why the change was needed. I did it in order to fix an issue with dead keys that were not handled correctly. Dead keys are used for key combination. For example in French keyboard pressing '^' key then after that 'u' key should result in the

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Brad Huber
: [osg-users] Keypress broken since rev 11749 Hi Vivien, Thanks for replying, it's good to know why the change was needed. I did it in order to fix an issue with dead keys that were not handled correctly. Dead keys are used for key combination. For example in French keyboard pressing '^' key

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Vivien Delage
Hi Brad, I totally aggree with what you said. This is also what I proposed to Robert in the submission thread. Basically the best would be to have a new event of type UnicodeCharEntered or something like this. This way we could leave the keydown and keyup events as they were and only using

Re: [osg-users] Keypress broken since rev 11749

2010-09-16 Thread Trajce (Nick) Nikolov
Hi Brad, that is what I was expecting while reading this thread, that you have the GraphicsWindowWin32 into some framework ... You need to pass the event from MFC to the window. In your OnKeyDown you get the window handle and pass thru the event. If you need details let me know This is how I

[osg-users] Keypress broken since rev 11749

2010-09-15 Thread Brad Huber
It appears that with the changes to GraphicsWindowWin32.cpp at rev 11749 that keypress does not get called when one hits a non special key (eg one of the letter keys). If I understand correctly, non-special keys are no longer totally handled from WM_KEYDOWN and they are supposed to use WM_CHAR or

Re: [osg-users] Keypress broken since rev 11749

2010-09-15 Thread Jean-Sébastien Guay
Hi Brad, It appears that with the changes to GraphicsWindowWin32.cpp at rev 11749 that keypress does not get called when one hits a “non special” key (eg one of the letter keys). If I understand correctly, non-special keys are no longer totally handled from WM_KEYDOWN and they are supposed to