Re: Ctrl key, event state value, XIM vs IBus
- From: Luc Pionchon <pionchon luc gmail com>
- To: Rui Tiago Cação Matos <tiagomatos gmail com>
- Cc: GTK Development List <gtk-devel-list gnome org>
- Subject: Re: Ctrl key, event state value, XIM vs IBus
- Date: Tue, 4 Jun 2013 07:18:28 +0300
On 3 June 2013 22:49, Rui Tiago Cação Matos <tiagomatos gmail com> wrote:
On 3 June 2013 20:37, Luc Pionchon <pionchon luc gmail com> wrote:
I have a program that connects to the key pressed event. I am getting
different event->state value for Ctrl, depending on the input method.
- XIM gives 4
- IBus gives 33554436
The IBus gtk+ module uses bits 24 and 25 on the GdkEventKey.state mask
to mark events in order to prevent a loop that would otherwise happen
due to how it processes events.
is this how it is meant to be? How should I process it?
You should process it like any other mask, use bit-wise operations. i.e.
if (state & GDK_CONTROL_MASK) { /* Ctrl bit is set */ }
Oh. Thank You Rui!
Luc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]