Assigning an alternative function to a mouse key

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Assigning an alternative function to a mouse key

Postby akbrian » Aug 26th, '17, 06:33

I'm using Mageia 6 and mostly KDE these days.
My wireless mouse is a Logitech M570. My wireless keyboard is a Logitech K360.
Image
In addition to the the standard mouse buttons and scroll wheel it as another pair of buttons. Currently while browsing they function as "back" and "forward'. I would prefer "page up" and "page down".
The upper button is button 9
Code: Select all
$ xev | grep -A 2 Button
ButtonPress event, serial 37, synthetic NO, window 0x7e00001,
    root 0x4b6, subw 0x7e00002, time 1435518974, (34,50), root:(1318,79),
    state 0x0, button 9, same_screen YES
--
ButtonRelease event, serial 37, synthetic NO, window 0x7e00001,
    root 0x4b6, subw 0x7e00002, time 1435519302, (34,50), root:(1318,79),
    state 0x0, button 9, same_screen YES

I want to map it to the page up key on my keyboard
Code: Select all
$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x0 + c:112
    Prior

The lower button is button 8
Code: Select all
$ xev | grep -A 2 Button
ButtonPress event, serial 37, synthetic NO, window 0x7e00001,
    root 0x4b6, subw 0x7e00002, time 1435532292, (34,50), root:(1318,79),
    state 0x0, button 8, same_screen YES
--
ButtonRelease event, serial 37, synthetic NO, window 0x7e00001,
    root 0x4b6, subw 0x7e00002, time 1435532534, (34,50), root:(1318,79),
    state 0x0, button 8, same_screen YES

I want to map it to the page down key on my keyboard
Code: Select all
$ xbindkeys -k
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.
"(Scheme function)"
    m:0x0 + c:117
    Next

What's the easiest way to do this?
akbrian
 
Posts: 60
Joined: Sep 10th, '11, 01:56

Re: Assigning an alternative function to a mouse key

Postby doktor5000 » Aug 26th, '17, 11:38

The most portable way would be via xmodmap, see e.g. https://wiki.archlinux.org/index.php/xmodmap
You should also take a look at https://wiki.archlinux.org/index.php/Mo ... d_and_back and the previous part of that wiki page, as it explains the context.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18055
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest