Re: [textadept] Caps Lock (Was: Textadept 2.2 Beta 2)

From: mitchell <c....at.caladbolg.net>
Date: Sat, 10 Jul 2010 10:51:44 -0400 (EDT)

On Fri, 9 Jul 2010, Robert wrote:

> On Fri, Jul 9, 2010 at 5:35 AM, mitchell <c....at.caladbolg.net> wrote:
> [snip]
>>> No keypresses are accepted until you press caps lock again.
>>> I also found that there is a gdk_keymap_get_caps_lock_state function [1].
>>> Mitchell, could this possibly be included?
>>
>> Your Lua code or gdk_keymap_get_caps_lock_state? The Lua code should go on
>> the wiki.
>>
>> mitchell
>>
> The latter, my caps lock function has the disadvantage that it does
> not work when caps has already been pressed before starting Textadept
> - having the actual state would be better.

Perhaps someone familiar with this problem should submit a patch. The appropriate code is in src/textadept.c:432 (s_keypress). gdk_keymap_get_caps_lock_state could be called, and based on that, the event->state's GDK_SHIFT_MASK can be modified (if I understand the problem correctly).

mitchell
Received on Sat 10 Jul 2010 - 10:51:44 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:50:18 EST