Re: Ctrl key, event state value, XIM vs IBus
- From: Rui Tiago Cação Matos <tiagomatos gmail com>
- To: Luc Pionchon <pionchon luc gmail com>
- Cc: GTK Development List <gtk-devel-list gnome org>
- Subject: Re: Ctrl key, event state value, XIM vs IBus
- Date: Mon, 3 Jun 2013 21:49:37 +0200
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 */ }
Rui
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]