LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   KDE - Start Button (https://www.linuxquestions.org/questions/linux-software-2/kde-start-button-55959/)

Neuronet 04-21-2003 04:02 PM

My left MS button *will* map to something but only when used in conjunction with another key (e.g. MS + A).

My right MS button doesn't even register a keystroke.

That's what I meant.

onurb 04-21-2003 04:16 PM

Ok, first type xev in a console
now press the key and write down the key- code that comes up,
there is a line simular to:

state 0x10, keycode 120 ( keysym etc. etc.

Ok suppose the keycode is 120

now make a file in KDE autostart ( or other window manager ) called "mmkeys "

#!/bin/bash
xmodmap -e 'keycode120=F13'
(more keys if you want, F14 F15 etc.)
#end script

Logout, login to restart KDE

Now you can assign the key to an action in kmenuedit, I know the "start-button" does not show there but if you manage to find the command you can fill in the path there.

Bruno

Neuronet 04-23-2003 06:19 AM

The problem is that I wanted the start button to map directly to the K-menu. I mean, with the config tool I can bind it to a key COMBO - but not *just* the MS key.

Second point - the right MS key doesn't register as a keystroke when I press it (in the k menu tool). That doesn't bother me as I don't use it - but somebody else mentioned that their system didn't register depressions of the right key and I thought I'd mention mine didn't either.

zokik 04-23-2003 01:23 PM

Quote:

Originally posted by onurb
now make a file in KDE autostart ( or other window manager ) called "mmkeys "

#!/bin/bash
xmodmap -e 'keycode120=F13'
(more keys if you want, F14 F15 etc.)
#end script

Huh? Where do I put this file, I mean, in which directory? I don't know anything about auto-executed scripts...

zokik 04-23-2003 03:19 PM

It works great after I enter

xmodmap -e 'keycode120=F13'

in bash, even as a single key, but I still can't figure out where to put this to be automated. A search for *utostart* gave me these directories:

/etc/skel/.kde/Autostart
/home/my_user_name/.kde/Autostart
/root/.kde/Autostart
/usr/share/autostart

and none of them seems to be the right one :(

Proud 04-23-2003 03:40 PM

Save that bash script text into a file in your /home/my_user_name/.kde/Autostart

zokik 04-23-2003 04:52 PM

I already tried that, then I put the file also in those other directories I listed in previous post, still no success.

Oh, I didn't mention before, I think it has to be with a space between "keycode" and "120" or whatever number (for my Cherry G83 that's 115 for left win key and 116 for right win key):

xmodmap -e 'keycode 120=F13'
and not
xmodmap -e 'keycode120=F13'

Anyway, in /home/my_user_name/.kde/Autostart I tried also without space.

Well, at least this win key thing is not very crucial ...

Neuronet 04-27-2003 06:47 AM

I can't even get that far :-)
I did the xev test and got the switch-number 115.
I enter ...

xmodmap -e 'keycode 115=F13'

and get the error message...

xmodmap: unknown command on line commandline:0

zokik 04-27-2003 10:55 AM

Maybe you just don't have it in your path. Search for xmodmap and then enter the full path, like

/urs/local/bin/xmodmap -e 'keycode 115=F13'

green_dragon37 04-27-2003 11:11 AM

You should put a line like
keycode 120=F13
in a file called ".Xmodmap" in your home direcotry.
Then restart X and the keymap will be available to you.

For example, the .Xmodmap for my logitech wireless

Code:

keycode 236 = F13
!
keycode 145 = F14
!Volume Dowm
keycode 174 = F15
!Volume Up
keycode 176 = F16
!
keycode 146 = F17
!
keycode 147 = F18
!
keycode 229 = F19
!
keycode 148 = F20
!
keycode 230 = F21
!
keycode 178 = F22
!
keycode 223 = F23
!Back Button
keycode 234 = F24
!Sleep/User Button
keycode 233 = F25
!
keycode 237 = F26
!Mute
keycode 160 = F27
!Seek Fwd
keycode 153 = F28
!Seek Back
keycode 144 = F29
!Play/Pause
keycode 162 = F30
!Stop
keycode 164 = F31
!Scroller Push
!keycode 150 =

HTH

Ian

zokik 04-27-2003 12:03 PM

Thanks, I put this:
keycode 115 = F13
!
keycode 116 = F14
!
keycode 117 = F15
!


and it works!


All times are GMT -5. The time now is 03:17 AM.