On Wed, 4 Apr 2012 19:06:41 +0900 Kim Shinwoo <kimcinoo....@gmail.com> said:
> Thanks for your response, The KEY_DOWN/UP events depend on > implementation of the ecore_win32_event as you know. > But the message is different between X11 and Windows. When I hold down > the 'space' key, the message comes as bellows. > > WM_KEYDOWN > WM_CHAR > WM_KEYDOWN > WM_CHAR > ... > WM_KEYDOWN > WM_CHAR ok. the logic seemed to work something like that... > For reference, > in case of 'shift' and 'control' keys > WM_KEYDOWN > WM_KEYDOWN > ... > WM_KEYDOWN > > 'alt' key > WM_SYSKEYDOWN > WM_SYSKEYDOWN > ... > WM_SYSKEYDOWN ok... so when do we know shift (or alt) are RELEASED? is there no key up of some sort? > so, I added the ecore_event_add(ECORE_EVENT_KEY_UP) just after adding > DOWN event. this is a bit of a problem as the key is still pressed though u have put in a up event. > but always the different # of downs and ups. ((# of ups) == ((# of > downs) +(1))) :) > before revising the patch. please enlighten me which is the best way > to fix the issue... > > > > 2012/4/2 Carsten Haitzler <ras...@rasterman.com>: > > On Sun, 1 Apr 2012 19:23:06 +0900 Kim Shinwoo <kimcinoo....@gmail.com> said: > > > > i'm looking at _ecore_win32_window_procedure(). > > > > for WM_KEYDOWN + WM_SYSKEYDOWN > > _ecore_win32_event_handle_key_press(data, 1); > > > > and for WM_CHAR + WM_SYSCHAR > > _ecore_win32_event_handle_key_press(data, 0); > > > > these are the ONLY 2 places int he ecore_win32 code i find that call this. > > (quick grep). > > > > for the 2nd we are ok - is_keystroke is 0 so your new code is never > > triggered, so we get a key down only as before. for the 1st we now get a > > key down immediately followed by a key up. can ou walk me through the > > windows event order when you get key repeats? > > > > in x11 it's easy. you get: > > > > down, up, down, up, down, up... > > > > always the same # of downs and ups. you can guess its a key repeat *IF* the > > timestamp of the next key down == timestamp of the same key up before it. > > now walk me through the windows input events. i dont see you using > > _ecore_win32_event_keystroke_get() to decide this is_keystroke valued. its > > hardcoded still given your patch. > > > >> Yes, you are right, but there is something different.. > >> > >> The _ecore_win32_event_keystroke_get(); rules adding KEY_UP/DOWN > >> events by its return value. > >> If the key which occurs WM_KEYDOWN and WM_CHAR messages is pressed, > >> the _ecore_win32_event_keystroke_get(); returns 0 > >> So, down + up event occur not the down, down + up. > >> > >> WM_CHAR message > >> Posted to the window with the keyboard focus when a WM_KEYDOWN message > >> is translated by the TranslateMessage function. The WM_CHAR message > >> contains the character code of the key that was pressed. > >> > >> Umm.. but the wrong smell is from WM_KEYUP message. We can see.. down + up, > >> up. Then see you with revised patch. Thanks for your response. > >> > >> > >> 2012/3/30 Carsten Haitzler <ras...@rasterman.com>: > >> > On Fri, 30 Mar 2012 00:00:09 +0900 Kim Shinwoo <kimcinoo....@gmail.com> > >> > said: > >> > > >> > well i meant - the is_keystroke param. looking at the events, WM_KEYDOWN > >> > and WM_SYSKEYDOWN set it to 1, WM_CHAR and WM_SYSCHAR set it to 0 - is > >> > this correct. windows sends the first 2 events ona key press and the > >> > 2nd 2 on a release? because if this is the case you now get down (no up) > >> > on the first pair, and down + up on the 2nd. so u see down, down, up... > >> > that smells wrong to me... :/ > >> > > >> >> Umm.. because the key event works like that on the Ubuntu. > >> >> You can check by adding two callbacks to one object for key_down and > >> >> key_up. When you hold down the key which makes WM_CHAR/SYSCHAR message, > >> >> both callbacks will be called. And the is_keystroke is true, if > >> >> WM_CHAR/SYSCHAR message fires. > >> >> > >> >> 2012년 3월 29일 목요일에 Carsten Haitzler<ras...@rasterman.com>님이 작 > >> >> 성: > >> >> > On Wed, 28 Mar 2012 16:16:54 +0900 Kim Shinwoo > >> >> > <kimcinoo....@gmail.com> > >> >> said: > >> >> > > >> >> > what is this is_keystroke stuff an why should it fire a key up (on > >> >> wince/32) > >> >> > during a key press? > >> >> > > >> >> >> ah.. yes, you right the patch to fire the key-up event no the > >> >> >> mouse-up event. :) > >> >> >> > >> >> >> 2012/3/28 Vincent Torri <vincent.to...@gmail.com>: > >> >> >> > On Wed, Mar 28, 2012 at 4:23 AM, Kim Shinwoo > >> >> >> > <kimcinoo....@gmail.com> > >> >> wrote: > >> >> >> >> Dear All, Hello. > >> >> >> >> > >> >> >> >> Please review the previous patch first which is related with the > >> >> >> >> WIN > >> >> key. > >> >> >> > > >> >> >> > it's already in svn :-) > >> >> >> > > >> >> >> >> Even though there is no answer to the previous question, I have > >> >> >> >> made and attached a patch to fire the mouse-up event when you > >> >> >> >> hold down keys which make WM_CHAR and WM_SYSCHAR. > >> >> >> >> Please review the patch and give any feedbacks. Thanks. ;) > >> >> >> > > >> >> >> > hmm, you're talking about mouse up but the event is a keyboard one > >> >> >> > > >> >> >> > Vincent > >> >> >> > > >> >> >> > > >> >> ------------------------------------------------------------------------------ > >> >> >> > This SF email is sponsosred by: > >> >> >> > Try Windows Azure free for 90 days Click Here > >> >> >> > http://p.sf.net/sfu/sfd2d-msazure > >> >> >> > _______________________________________________ > >> >> >> > enlightenment-devel mailing list > >> >> >> > enlightenment-devel@lists.sourceforge.net > >> >> >> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >> >> >> > >> >> >> > >> >> ------------------------------------------------------------------------------ > >> >> >> This SF email is sponsosred by: > >> >> >> Try Windows Azure free for 90 days Click Here > >> >> >> http://p.sf.net/sfu/sfd2d-msazure > >> >> >> _______________________________________________ > >> >> >> enlightenment-devel mailing list > >> >> >> enlightenment-devel@lists.sourceforge.net > >> >> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > ------------- Codito, ergo sum - "I code, therefore I am" > >> >> > -------------- The Rasterman (Carsten Haitzler) > >> >> > ras...@rasterman.com > >> >> > > >> >> > > >> > > >> > > >> > -- > >> > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > >> > The Rasterman (Carsten Haitzler) ras...@rasterman.com > >> > > >> > > > > > > -- > > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel