LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-04-2007, 12:08 PM   #1
LonelyStar
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Rep: Reputation: 0
XKeyEvent and the mode_switch (AltGr) modifier


Hello together,

I am sending key events to an application using XSendEvent.
I creating an event like this as described on this page: http://homepage3.nifty.com/tsato/xvkbd/events.html

It all works, except if I want to set the mode_switch (it's called AltGr on my keyboard) modifier state. xmodmap tells me, that Mode_switch is placed on mod5. So I do something like this:
Code:
if(Want_shift)
  event.state|=ShiftMask;
if(Want_Alt)
  event.state|=Mod1Mask;
...
if(Want_Mode_switch)
  event.state|=Mod5Mask;
This works for all modifier except for Mode_switch .

What else do I need to do?
Thanks!
Nathan
 
Old 10-04-2007, 02:35 PM   #2
LonelyStar
LQ Newbie
 
Registered: Sep 2007
Posts: 10

Original Poster
Rep: Reputation: 0
I discovered, that the error was somewhere else. My AltGR key produces the XK_ISO_Level3_Shift keysym. It works now. Thanks for reading!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using winkey et al as modifier / compose keys noranthon Linux - Newbie 6 03-15-2007 12:14 PM
torrent metadata (files) modifier abs Linux - General 0 04-17-2005 02:35 AM
keyboard layout (alternative key with mode_switch) super-momo Debian 2 02-13-2005 12:22 AM
xfce4 modifier keys question acidream Linux - General 3 10-11-2004 04:17 PM
Using modifier keys for special characters kpfeiffer Linux - Newbie 5 10-19-2002 05:25 AM


All times are GMT -5. The time now is 05:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration