Re: [code] hotkeys with Cyrillic can`t work for me

From: Всеволод Балашов <vsevolod.balashov.att.yandex.ru>
Date: Mon, 28 Nov 2016 04:32:28 +0300

Now i make workaround on first look work fine for me.

static int s_keypress(GtkWidget* widget, GdkEventKey *event, void*__) {
   if (event->keyval > 127 &&
       (event->state & (GDK_CONTROL_MASK | GDK_META_MASK)))
gdk_keymap_translate_keyboard_state(gdk_keymap_get_for_display(gdk_screen_get_display(gtk_widget_get_screen(widget))),
event->hardware_keycode,
                                         event->state,
                                         1, //event->group, // why 1?
dont know!
&event->keyval, NULL, NULL, NULL);
   return lL_event(lua, "keypress", LUA_TNUMBER, event->keyval,
event_mod(SHIFT),
                   event_mod(CONTROL), event_mod(MOD1), event_mod(META),
                   event_mod(LOCK), -1);
}

27.11.2016 18:11, Всеволод Балашов пишет:
> Hello, Mitchell
>
> event->group == 0 in all my layouts.
> So, with or without #2249 output of print in 201 line absolutely
> identical.
>
> May be it only unity/ubuntu "feature" ?
>
> 27.11.2016 05:38, Mitchell пишет:
>> Hi Vsevolod,
>>
>> On Sun, 27 Nov 2016, Всеволод Балашов wrote:
>>
>>> Hello All!
>>>
>>>
>>> I see that hotkeys are not working when I use Cyrillic keyboard
>>> layout in my ubuntu 16.04. This only happens in unity, if I run the
>>> curses version (also in console within unity) - everything is fine.
>>> I`m trying v9.0 and nightly.
>>>
>>> Any ideas to fix it?
>>
>> There was a contribution[1] by Heck[2] just before 9.0 that fixed
>> some instances of Cyrillic key shortcuts. If you can recompile
>> Textadept without that change, does it still not work? Or perhaps the
>> workaround listed in the original e-mail may be helpful.
>>
>> If that doesn't shed light on anything, try uncommenting the
>> `print()` statement right around line 201 of `core/keys.lua` and run
>> Textadept from a terminal to see the keypresses that are not working
>> correctly. That may help diagnose the issue.
>>
>> I'm afraid I don't know much more about handling different key
>> layouts :(
>>
>> Cheers,
>> Mitchell
>>
>> [1]: http://foicica.com/hg/textadept/rev/008f87b08bcb
>> [2]: http://foicica.com/lists/code/201609/3325.html
>
>

-- 
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 Sun 27 Nov 2016 - 20:32:28 EST

This archive was generated by hypermail 2.2.0 : Mon 28 Nov 2016 - 06:26:51 EST