Re: [code] keymaps on console

From: Mitchell <m.att.foicica.com>
Date: Mon, 6 Apr 2015 10:26:26 -0400 (EDT)

Hi Joe,

On Fri, 3 Apr 2015, Joseph McDonald wrote:

>
> Hi,
>
> On 03/31/2015 08:35 AM, Mitchell wrote:
>> If you ever find the time to get this working on your own, please submit
>> a patch. As I mentioned, I don't have access to a keyboard with a numpad
>> so I cannot develop a proper patch.
>
> It looks like your patch is almost all the way there.
>
> int keysyms[] =
> {0,SCK_BACK,SCK_TAB,SCK_RETURN,SCK_ESCAPE,0,SCK_BACK,SCK_UP,S\
> CK_DOWN,SCK_LEFT,SCK_RIGHT,0,0,SCK_INSERT,SCK_DELETE,0,SCK_PRIOR,SCK_NEXT,SCK_H\
> OME,SCK_END};
>
> hit the "1" key:
>
> (gdb) p key.code.sym
> $13 = TERMKEY_SYM_SELECT
> (gdb) p keysyms
> $14 = {0, 8, 9, 13, 7, 0, 8, 301, 300, 302, 303, 0, 0, 309, 308, 0, 306,
> 307,
> 304, 305}
> (gdb) p (int)TERMKEY_SYM_SELECT
> $15 = 15
>
> (gdb) p keysyms[key.code.sym]
> $16 = 0
>
> So I think what's needed is a proper entry in keysyms[15]. But I don't
> know what it should be.
>
>
>
> same for the "5" key on the numberpad:
> p (int)TERMKEY_SYM_BEGIN
> $20 = 11
> (gdb) p keysyms[TERMKEY_SYM_BEGIN]
> $21 = 0
>
> and the "7" key on the numberpad:
>
> ) p (int)TERMKEY_SYM_FIND
> $22 = 12
> (gdb) p keysyms[TERMKEY_SYM_FIND]
> $23 = 0
>
> If you can tell me how to get the codes to use, I can plug them in and
> let you know if it works. (also how are they referenced in the
> init.lua so I can map the keypad to functions).

You'd probably want to use the "GDK_KEY_KP_*" codes in "gdk/gdkkeysyms.h".
Then you'd have to add them to Textadept's KEYSYMS table in
"core/keys.lua".

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Mon 06 Apr 2015 - 10:26:26 EDT

This archive was generated by hypermail 2.2.0 : Tue 07 Apr 2015 - 06:31:13 EDT