It seems to me key-down and key-up events are not desirable, not only in 
Windows Factor.
For example, on Mac Factor, when the "Q" key is pressed with a shift key, 
gesture-logger
reports:

  T{ key-down { sym "Q" } }
  User input: Q
  T{ key-up { sym "Q" } }

I think it should be:

  T{ key-down { mods { S+ } } { sym "q" } }
  User input: Q
  T{ key-up { mods { S+ } } { sym "q" } }


I changed key-codes which is in 
/Applications/factor/basis/ui/backend/cocoa/views/views.factor
like this:

CONSTANT: key-codes
H{
        { 29 "0" } ! <- added
        { 18 "1" } ! <- added
        { 19 "2" } ! <- added

        { 0 "a" } ! <- added
        { 11 "b" } ! <- added
        { 9 "c" } ! <- added
        
        { 71 "CLEAR" }
        { 36 "RET" }
        { 76 "ENTER" }
        { 53 "ESC" }
        { 48 "TAB" }
        { 51 "BACKSPACE" }
        { 115 "HOME" }
        { 117 "DELETE" }
        { 119 "END" }
        { 122 "F1" }
        { 120 "F2" }
        { 99 "F3" }
        { 118 "F4" }
        { 96 "F5" }
        { 97 "F6" }
        { 98 "F7" }
        { 100 "F8" }
        { 123 "LEFT" }
        { 124 "RIGHT" }
        { 125 "DOWN" }
        { 126 "UP" }
        { 116 "PAGE_UP" }
        { 121 "PAGE_DOWN" }
    } 

Then events about "0", "1", "2", "a", "b" and "c" key are desirable for me.

In conclusion, I think all keys which can exist should be added in key-codes.


--
KUSUMOTO Norio



> 2019/03/29 10:03、KUSUMOTO Norio <kusum...@na.rim.or.jp>のメール:
> 
> Sorry, I’ll correct my message.
> 
>> 1. Why are send-key-up called by handle-wm-char?
> 
> 1. Why are send-key-down called by handle-wm-char?
> 
> --
> KUSUMOTO Norio
> 
> 
>> 2019/03/29 9:49、KUSUMOTO Norio <kusum...@na.rim.or.jp> のメール:
>> 
>> When I read the file, I have some questions.
>> These are:
>> 1. Why are send-key-up called by handle-wm-char?
>> 2. Why doesn’t Factor handle shift key as a modifier key at key-down event?
>> --
>> KUSUMOTO Norio
> 
> 
> 
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk



_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to