LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2008, 01:30 AM   #1
jakykong
Member
 
Registered: Apr 2006
Location: Washington
Distribution: Debian Gnu/Linux Lenny on AMD64x2 (32-bit mode), an AMD Sempron 64 laptop, debian, 32bit
Posts: 101

Rep: Reputation: 15
intercept keystrokes, prevent them from reaching X11


Greetings!

I ordered a Logitech G15. It's in the mail, and while it's on its way, I'm pondering the various (geeky) things I could do with it.

What I would like to do is set it up so that my instant messenging happens on the LCD panel. I'm perfectly willing to write the code to do this part.

The problem is this: when running an X server (as we all like to do), the X server generally gets all the keyboard input. I would like to divert the keyboard input when I press a key combination (and un-divert it when I press the combination again) to an arbitrary application.

Does anyone know of a way to do this (aside from hacking xfree86)?
 
Old 07-12-2008, 07:56 AM   #2
alan_ri
Senior Member
 
Registered: Dec 2007
Location: Croatia
Distribution: Debian GNU/Linux
Posts: 1,733
Blog Entries: 5

Rep: Reputation: 127Reputation: 127
Maybe here you will find what you need.
 
Old 07-12-2008, 11:07 AM   #3
jakykong
Member
 
Registered: Apr 2006
Location: Washington
Distribution: Debian Gnu/Linux Lenny on AMD64x2 (32-bit mode), an AMD Sempron 64 laptop, debian, 32bit
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by alan_ri View Post
Maybe here you will find what you need.
That will help if I ever write a Java-based GUI program .

The problem is, while this can detect keys within an application, it can't stop keys from being sent to other applications, nor can it detect keys that weren't sent directly to it.

Thanks for the reply
 
Old 07-14-2008, 06:13 AM   #4
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
Quote:
Originally Posted by jakykong View Post
Greetings!

I ordered a Logitech G15. It's in the mail, and while it's on its way, I'm pondering the various (geeky) things I could do with it.

What I would like to do is set it up so that my instant messenging happens on the LCD panel. I'm perfectly willing to write the code to do this part.

The problem is this: when running an X server (as we all like to do), the X server generally gets all the keyboard input. I would like to divert the keyboard input when I press a key combination (and un-divert it when I press the combination again) to an arbitrary application.

Does anyone know of a way to do this (aside from hacking xfree86)?


I dont know but in the new distros there is SCIM, which is key input for all kinds of languages, which may have done the hacking See whether poking about with this gives you the result you need.
 
Old 07-14-2008, 02:28 PM   #5
jakykong
Member
 
Registered: Apr 2006
Location: Washington
Distribution: Debian Gnu/Linux Lenny on AMD64x2 (32-bit mode), an AMD Sempron 64 laptop, debian, 32bit
Posts: 101

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by resetreset View Post
I dont know but in the new distros there is SCIM, which is key input for all kinds of languages, which may have done the hacking See whether poking about with this gives you the result you need.
Looking at it for a quick moment, it looks very promising. I'll have to look with a little more detail, but I'm wondering if (since it has keystrokes for different input systems) it would work to just write a custom "input system" that feeds the keys to my application.

Thanks!

Last edited by jakykong; 07-14-2008 at 02:28 PM. Reason: typo
 
  


Reply



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
SunPCI keyboard intercept. Brian Knoblauch Solaris / OpenSolaris 0 03-10-2006 09:17 AM
Can't intercept signal SIGXCPU yakotey Programming 2 12-07-2005 02:09 AM
how to intercept all the system call qqrilxk Programming 2 10-27-2004 10:06 AM
Intercept outgoing traffic through a firewall???? macburton Linux - Security 1 10-17-2004 01:10 PM
How do I intercept CTRL+ALT+DEL? phil1076 Linux - General 2 12-09-2003 02:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:43 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration