Richard
Topic Author
Posts: 6
Joined: 13 Jul 2019, 15:24

KeyDown KeyUp for symbols

26 Jul 2019, 05:09

xaml:
<TextBox .... KeyUp="OnKeyUp" KeyDown="OnKeyDown">

C++:
void OnKeyDown(BaseComponent *component, const Noesis::KeyEventArgs& e)
{
}

The digital and the alpha key event is called, but the minus and other some symbol key is not called.

Tags:
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyDown KeyUp for symbols

26 Jul 2019, 16:12

Is this using the Win32 implementation?
 
Richard
Topic Author
Posts: 6
Joined: 13 Jul 2019, 15:24

Re: KeyDown KeyUp for symbols

30 Jul 2019, 18:06

It is in Linux 64 bits environment.
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyDown KeyUp for symbols

30 Jul 2019, 19:44

That layer is part of the Application Framework, whose source code is included in the SDK. For Linux, the implementation in charge of that is the XDisplay. This is the function that inject key events to the view:
static Key NoesisKey(KeySym k)
{
    switch (k)
    {
        case XK_Cancel: return Key_Cancel;
        case XK_BackSpace: return Key_Back;
        case XK_Tab: return Key_Tab;
        case XK_Linefeed: return Key_LineFeed;
        case XK_Clear: return Key_Clear;
        case XK_Return: return Key_Return;
        case XK_Pause: return Key_Pause;
        case XK_Caps_Lock: return Key_CapsLock;
        case XK_Escape: return Key_Escape;
        case XK_space: return Key_Space;
        case XK_Page_Up: return Key_PageUp;
        case XK_Page_Down: return Key_PageDown;
        case XK_End: return Key_End;
        case XK_Home: return Key_Home;
        case XK_Left: return Key_Left;
        case XK_Up: return Key_Up;
        case XK_Right: return Key_Right;
        case XK_Down: return Key_Down;
        case XK_Select: return Key_Select;
        case XK_Execute: return Key_Execute;
        case XK_Print: return Key_PrintScreen;
        case XK_Insert: return Key_Insert;
        case XK_Delete: return Key_Delete;
        case XK_Help: return Key_Help;
        case XK_0: return Key_D0;
        case XK_1: return Key_D1;
        case XK_2: return Key_D2;
        case XK_3: return Key_D3;
        case XK_4: return Key_D4;
        case XK_5: return Key_D5;
        case XK_6: return Key_D6;
        case XK_7: return Key_D7;
        case XK_8: return Key_D8;
        case XK_9: return Key_D9;
        case XK_a: return Key_A;
        case XK_b: return Key_B;
        case XK_c: return Key_C;
        case XK_d: return Key_D;
        case XK_e: return Key_E;
        case XK_f: return Key_F;
        case XK_g: return Key_G;
        case XK_h: return Key_H;
        case XK_i: return Key_I;
        case XK_j: return Key_J;
        case XK_k: return Key_K;
        case XK_l: return Key_L;
        case XK_m: return Key_M;
        case XK_n: return Key_N;
        case XK_o: return Key_O;
        case XK_p: return Key_P;
        case XK_q: return Key_Q;
        case XK_r: return Key_R;
        case XK_s: return Key_S;
        case XK_t: return Key_T;
        case XK_u: return Key_U;
        case XK_v: return Key_V;
        case XK_w: return Key_W;
        case XK_x: return Key_X;
        case XK_y: return Key_Y;
        case XK_z: return Key_Z;
        case XK_KP_0: return Key_NumPad0;
        case XK_KP_1: return Key_NumPad1;
        case XK_KP_2: return Key_NumPad2;
        case XK_KP_3: return Key_NumPad3;
        case XK_KP_4: return Key_NumPad4;
        case XK_KP_5: return Key_NumPad5;
        case XK_KP_6: return Key_NumPad6;
        case XK_KP_7: return Key_NumPad7;
        case XK_KP_8: return Key_NumPad8;
        case XK_KP_9: return Key_NumPad9;
        case XK_KP_Multiply: return Key_Multiply;
        case XK_KP_Add: return Key_Add;
        case XK_KP_Separator: return Key_Separator;
        case XK_KP_Subtract: return Key_Subtract;
        case XK_KP_Decimal: return Key_Decimal;
        case XK_KP_Divide: return Key_Divide;
        case XK_F1: return Key_F1;
        case XK_F2: return Key_F2;
        case XK_F3: return Key_F3;
        case XK_F4: return Key_F4;
        case XK_F5: return Key_F5;
        case XK_F6: return Key_F6;
        case XK_F7: return Key_F7;
        case XK_F8: return Key_F8;
        case XK_F9: return Key_F9;
        case XK_F10: return Key_F10;
        case XK_F11: return Key_F11;
        case XK_F12: return Key_F12;
        case XK_F13: return Key_F13;
        case XK_F14: return Key_F14;
        case XK_F15: return Key_F15;
        case XK_F16: return Key_F16;
        case XK_F17: return Key_F17;
        case XK_F18: return Key_F18;
        case XK_F19: return Key_F19;
        case XK_F20: return Key_F20;
        case XK_F21: return Key_F21;
        case XK_F22: return Key_F22;
        case XK_F23: return Key_F23;
        case XK_F24: return Key_F24;
        case XK_Num_Lock: return Key_NumLock;
        case XK_Scroll_Lock: return Key_Scroll;
        case XK_Shift_L: return Key_LeftShift;
        case XK_Shift_R: return Key_RightShift;
        case XK_Control_L: return Key_LeftCtrl;
        case XK_Control_R: return Key_RightCtrl;
        case XK_Alt_L: return Key_LeftAlt;
        case XK_Alt_R: return Key_RightAlt;
    }

    return Key_None;
}
I wonder if you could debug that part to see what's going on in your specific layout.
 
Richard
Topic Author
Posts: 6
Joined: 13 Jul 2019, 15:24

Re: KeyDown KeyUp for symbols

31 Jul 2019, 14:55

The modified Login sample for textbox and passwordbox KeyDown event, the console show the message when key pressed. But non alpha & digital symbols are missing event
https://mega.nz/#!qr4zSCAK!9SEnrLB5i6gi ... ndPLN4Qx4o
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyDown KeyUp for symbols

31 Jul 2019, 15:43

Sorry, not following here. What's contained in the attachment? A patch with a solution? In that case, please provide the diff only.
 
Richard
Topic Author
Posts: 6
Joined: 13 Jul 2019, 15:24

Re: KeyDown KeyUp for symbols

01 Aug 2019, 09:49

The attachment is the modified login sample show this issue. you can rename it and put into the subdirectory inside the noesisgui sdk and make clean and diff to view the the modification.
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyDown KeyUp for symbols

01 Aug 2019, 13:18

I pasted above the function I need you to debug in your machine. Please, indicate the KeySym that is failing and if possible the list of changes needed. I am not able to reproduce the issue here.
 
Richard
Topic Author
Posts: 6
Joined: 13 Jul 2019, 15:24

Re: KeyDown KeyUp for symbols

02 Aug 2019, 12:50

you posted code is in Src/Packages/App/XDisplay/Src/XDisplay.cpp
By adding more definitions from X11/keysymdef.h and NsGui/InputEnums.h, it is working.
Thanks
 
User avatar
jsantos
Site Admin
Posts: 2906
Joined: 20 Jan 2012, 17:18
Contact:

Re: KeyDown KeyUp for symbols

02 Aug 2019, 12:53

Thanks for the feedback!

Could you please paste the modifications here? I want to merge them.

Who is online

Users browsing this forum: No registered users and 0 guests