Keyboard mapping using xev see what key code, a key is bond to?
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Keyboard mapping using xev see what key code, a key is bond to?
Slackware64-13.1 multilib Xfce few kapps (ksnapshot,blogilo) using Logitech S530 Y-RAK73 mac board.
Need to understand howto use xev to map my keyboard keys to bind useful functions for F1-F15 and a few combination, command key, media buttons etc. Function keys are all workspace related and I don't think there are 12 work spaces - I see this in "Settings Editor" under expanded default.
Under Settings Editor: Most everything under Type says Empty? Forgive my ignorance, I've just run Slackware in basic mode doing networking stuff out of the box till now, that I want to do graphic, media, photography, and web page activities.
What is the Lock check box do, in Settings Editor? Clicking on it doesn't do anything? Lucky for me, maybe
What are menu accelerators? May i have an example please? Like command key in mac to open ie. selection mode within the ksnapshot menu?
What is GPtrArray_GValue_ in "Settings Editor"?
Googled & bookmarked key shortcuts,logictech mac keyboard mapping. Xfce wiki topics, mostly for other distros. Wiki says to "run xev".. tried it in xterm and I didn't understand what was showing in term. A little white box appear on desktop but nothing showed up when I pressed a key. Thought I would get output of keys as I pressed them?
How do I interact with "xev"? To see what key code a particular key is calling.
Is it ok create file .Xmodmap in $Home then put use output from xev to create keycode xxx = function or app to open? There is an
xmodmap in /usr/bin already. Where is .xprofile file? Am I supose to make and .xprofile and put it in $Home too?
!Can I just add GTK+ ver 2.10 to existing GTK+ ver. How do I check system to see what ver GTK+ is installed? Command and window key may work under v2.10 according to wiki.
Finally will i have to put /usr/bin/xmodemap and $Home/.xmodmap into .xinitrc or .xprofile? Been at this for days; Please, anyone could just clear this up for me I really really appreciate it. Thank you
Ok.. tried to ran xev using atl+F2 and the little white box opened up. Think its called the "Testing Area"... but when I tap any key nothing shows up. So how is xev sueposed to be run? Am i supose to run it in a terminal? How do I get the output? Or where do I find the output? Thank you
I can explain how xev works but so I'm not wasting my time I'd like to know what DE/WM you're using.
Assuming DE/WM is xfce/xfwm4 then you should just use xfce keyboard settings (on xfce4-settings-manager) to customise your keymap choices.
xev can be used to display X display events (mouseclicks, key press map codes etc).
If you need to use xev then run from terminal xev, forget the white box testing area. Look at the terminal output and press a few keys, same ones and different ones -you'll see a number change in the output - this number is the corresponding keymap number for the X display event (key press, mouseclick etc).
This information can then be used accordingly to your DE/WM on use. But as above, if you're using xfce/xfwm4 then I don't believe xev is required for your purpose of customising hot-keys.
How xev works:
Run it in terminal. The Testing Area little white box is just to focus with mouse and map mouse buttons. After focusing on test area - press one key on keyboard You get quite a few lines of out put scroll up till you see line that starts keyPress:
The settings editor mentioned in the original post (xfce4-settings-editor, I think from memory) is a bit advanced - dare I say, a bit win32 registry, oo-er, :-P ; xfce4 DE has some really capable settings/tools for many DE tasks/configuration options. The settings editor, I've found seems to break the KISS pathway I follow, IMHO.
.Xmodmap can be customised - indeed I use this for my WM, fluxbox, but xfce4's DE/WM should take care of any reason for having to customise .Xmodmap, generally speaking - I'm sure examples could be posted here too. Let the forum know how u get on...
dh2k, quickly what are u referring to when you say DE/WM.. I'm just using Xfce with kde apps of which I currently am only interested in the two I mentioned....
Did get xev to work fine and I copied everything to mouse pad for reference.
Funny thing the PC i was on broke down! Gateway 9310X neighbor had given me. Fed up I gutted the Gateway out and plugged that hdd into My solid home built, hdd drive is fine. I'm adding a few parts to home build and thinking of installing slackware64-13.37, have to check it will give me GTK 2.10. & getting rid of Windows XP, only use photo elements and photo paint shop, for those two pieces of software alone the box is wasted on XP. Hate Brand Name Junk.
So I will have to post here as i go along with gimp & geeqie. Will try to configure key short cuts in "xfce4-settings-manager" per your suggestion, but i find it easier to create a file with settings i need than navigating the gui sometimes. Just find an example of format and syntax. If memory serves me correct i had tried to setup the Key Short Cut to open Bash in Xfce Settings Manager and I must have been doing something wrong cause it wouldn't take. Thank you
DE/WM are Desktop-Environment (XFCE4) / Window-Manager (xfwm4), is an example.
But you could have DE (XFCE4) / Window-Manager (compiz or kwin or metacity etc)
So different hot-keys need to be configured inline with the DE/WM in use.
Again, hot-keys setup for xfce4's default window manager (xfwm4) would be defunct if you were using an alternative WM - etc - .
The DE & WM usually take care of tasks such as key-shortcuts and other desktop/window customisation.
...but i find it easier to create a file with settings i need than navigating the gui sometimes. ...
I agree, but if you are using a DE like xfce4 then this is probably stored in an xml/config file somewhere in ~/.config/../.. - from memory, I can't dictate the exact location.
But as above, I do agree with KISS - "Keep It Simple; Stupid!, is a great way to have an excellent server/desktop, which is why I use fluxbox Window Manager where all keys combinations are customised in this manner, located at "~/.fluxbox/keys" - where they are a simple text-config file formatted as "Exec [keycode(s)] APP_TO_RUN" - that simple.
You are really helpful dh2k, Gutted out the GateWay Box, ditched WindowsXP, installed Slackware64-13.37, then 64 current. DE/WM is Xfce 4.6.2.. thought i was getting 4.8 with current Guess my WM is xfwm4 this is same as XFCE4.6.2?
What is a Super Key? My Command Key is a Super Key? Looking at ~/.config/xfce4/xfconf/xfce-perchannel-xml:
There are seven .xml files in this folder. Maybe after I learn about shell scripts and a little programing i can go to a simpler WM - tried icewm. Started slackware with other window mangers, it was hard, Xfce made it easier for me to learn what i know of slackware now. Thank you.
XFCE4 is good; very good. I just prefer fluxbox. I too, first became very familiar with xfce with Slack' as a less resource/simpler DE. As basic as fluxbox looks by default - it can be really, really tweaked - easily - but enough about flux'.
Super key is (usually/should) be mapped as the Win-logo key - inbetween (left)<ctrl> and (left)<alt>.
But editing xml files - as easy as it can be - rather you than me ;-P
Ran into few problems.. panel disappeared and started getting "unknown media type in type 'all/all' + 10 more similar lines. I googled the error and trace it back to /usr/share/mime/packages/kde.xml. Tried the recommended fix removing related lines. However, not knowing xml makes it difficult to edit xml configuration files. Wish Xfce config files were more like slackware's text based conf files. Long story short just removed all of kde.
Panel bar requires Alt+F2 still, shutdown button has become quit, startx opens xfce + home file manager + mousepad + Xterminal?? Is it Xfce or Current ver. ? Need to put a local current local mirror on here.
As for keyboard mapping- my super key is a mac command key but I have bigger fish to fry now. Need to learn how to check changes in slackware64 current and setup a local mirror on /usr/local, tomorrow Or role back my slackware version from 13.38.7 version 3? Thank you