LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-10-2003, 06:51 PM   #1
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Rep: Reputation: 32
Extended Keyboards


I have a Microsoft "Natural Multimedia" keyboard, but anyone with any extended keyboard may have a similar problem.

It is not supported in the "inet" file that comes with Mandrake 9.1, but another keyboard, a Logitech, was very close, so I edited the inet file and got the keys loaded to produce such wonderful commands as XF86Spell and Redo, etc.

Setting up Key Allocations in KDE using KDE Control Centre/Accessibility/Keyboard Shortcuts, I can allocate Global keys perfectly, so I can get commands such as XF86PowerOff allocated to my "Log Off" key. But when I go into the Application Shortcuts tab, I cannot allocate controls such as Redo to the key labelled Redo. (Redo will allocate to a Global however). Yet I can allocated Standard keypresses (eg something like CTRL-SHIFT-F6 etc) to an Application Shortcut.

Can anyone tell me why this is and whether there is a way to allocate these keys to standard KDE application shortcuts?

DAVE
 
Old 05-14-2003, 12:25 PM   #2
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
I tried this without success too, I guess it is a bug in kde. In order to make it work, I used an application called hotkeys, that is a daemon that listens to the specific keycodes, and execute something as configured in the defs files, and to simulate kde features I used some dcop lines in these defs ...
 
Old 05-14-2003, 02:14 PM   #3
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
I'm also using hotkeys. I'm not running it as a daemon, I've put a shortcut to it in the KDE startup folder.

I'll try and check this out myself (as in RTFM) but what is a dcop line?

DAVE
 
Old 05-14-2003, 04:47 PM   #4
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
Vladkrack -- I have now RTFM - actually the help lines and some stuff on the internet. I an no wiser.

Can you get dcop to send a series of keypresses to the KDE system as if you pressed the keys? If so, how?

Dave
 
Old 05-14-2003, 05:21 PM   #5
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
Hi davecs,

Glad you made it...

Dcop it's a way that kde use to communicate with his proccess. There's some examples of how to use it:

# dcop kdesktop KDesktopIface lineupIcons #this causes align the icons

if you type just dcop, then returns his options, and one of the is kdesktop, and so on, until you have a complete line, that is a function.

Another example, if you start konqueror, if will appear another option to dcop, that shoud be like konqueror-${process number}, then you could use his options:

# dcop konqueror-665 konqueror-mainwindow#1 activateAction back #this causes to konqueror turn to the previous page

# dcop konqueror-665 konqueror-mainwindow#1 activateAction forward #this causes to konqueror turn to the next page

It's a little boring to find the exat functions to exactly what you want, but soon as you find you can use it in a script ...
 
Old 05-14-2003, 06:25 PM   #6
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
Is there a way, for example, to send a key combination to whichever program has focus?

I have a button marked "New". This returns the value "XF86New" when pressed. Clearly I cannot use this to start a program in "hotkeys". I can allocate it in Global shortcuts, but not to application shortcuts. Ctrl-N is the application shortcut for New.

So is there any way I can construct a command line to simulate me pressing CTRL-N, sent to the "selected" Window, so I can allocate it to the key using hotkeys?

DAVE
 
Old 05-14-2003, 07:40 PM   #7
vladkrack
Member
 
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334

Rep: Reputation: 30
I don't know if dcop has, I know that X has a way to determine what window is with focus, by the code the window, I can't remember how. xlsclients -l show the id's of all windows opened ...

You can use kdcop to browse dcop functions and try to discover if it has one to make what you want, then you can put it in a script, and execute this script with hotplug...
 
Old 05-15-2003, 02:56 PM   #8
davecs
Member
 
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503

Original Poster
Rep: Reputation: 32
Or maybe I should e-mail the author of hotkeys, there may be a simple way to simulate keypresses or he may be persuaded to fill one in...


DAVE
 
  


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
is there any linux keyboards out there? dragonforce Linux - Hardware 11 12-29-2008 11:45 PM
Using two keyboards. Radical_Dreamer Linux - Hardware 5 07-23-2005 03:28 PM
Two keyboards ionmich Slackware 1 03-23-2005 11:59 AM
Keyboards?!?! LoungeLizard General 2 01-29-2004 10:39 PM
keyboards pamyp72 Linux - Newbie 0 11-29-2001 03:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:37 AM.

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