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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-10-2003, 06:51 PM
|
#1
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Rep:
|
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
|
|
|
05-14-2003, 12:25 PM
|
#2
|
Member
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334
Rep:
|
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 ...
|
|
|
05-14-2003, 02:14 PM
|
#3
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
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
|
|
|
05-14-2003, 04:47 PM
|
#4
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
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
|
|
|
05-14-2003, 05:21 PM
|
#5
|
Member
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334
Rep:
|
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 ...
|
|
|
05-14-2003, 06:25 PM
|
#6
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
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
|
|
|
05-14-2003, 07:40 PM
|
#7
|
Member
Registered: Oct 2002
Location: Curitiba - Brazil
Distribution: Conectiva
Posts: 334
Rep:
|
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...
|
|
|
05-15-2003, 02:56 PM
|
#8
|
Member
Registered: Feb 2003
Location: Barking, Essex, Britain
Distribution: PCLinuxOS and MX-Linux
Posts: 503
Original Poster
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 02:37 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|