You are not logged in.

#1 2011-01-19 19:43:38

sushi
Member
Registered: 2011-01-19
Posts: 8

Keyboard with scroll, how to make it work?

Hello, I bought a keyboard which has a scroll just like the mouse, but it didn't work out of the box, as I expected, I did some research on it but I got no success. I've tried some keysyms such as XF86ScrollDown, XF86ScrollUp, Scroll_Down, Scroll_Up, MWheelup and MWheeldown but I got no success. Setting it as Up and Down does something close to scrolling but it just do that when there isn't a character cursor, any ideas?

Offline

#2 2011-01-19 20:19:39

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Keyboard with scroll, how to make it work?

Can you tell us the make and model of keyboard, output of uname -a


Mr Green

Offline

#3 2011-01-19 21:57:05

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

My keboard is a Sattelite AK-XP4: http://satellite-computer.com/product/K … ?id=AK-XP4
uname -a: "Linux pcdofundo 2.6.36-ARCH #1 SMP PREEMPT Sat Jan 8 14:15:27 CET 2011 x86_64 Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz GenuineIntel GNU/Linux"

Offline

#4 2011-01-19 22:03:29

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Keyboard with scroll, how to make it work?

Assuming its working as a keyboard it should show up in lsusb, you may have to look at xmodmap [if I have remembered correctly to set up key 4&5]

Do you get any response to scroll wheel in xev?


Mr Green

Offline

#5 2011-01-19 22:11:59

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

Mr Green wrote:

Assuming its working as a keyboard it should show up in lsusb, you may have to look at xmodmap [if I have remembered correctly to set up key 4&5]

Do you get any response to scroll wheel in xev?

Well, the response to scroll wheel in xev is 139 Undo and 190 Redo
Want I need to know is how is the scroll up and down function called, so I can remap the keyboard scroll wheel.

Last edited by sushi (2011-01-19 22:41:35)

Offline

#6 2011-01-20 21:12:38

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

sorry for bumping it but can't anyone give me some answers?

Offline

#7 2011-01-20 21:19:19

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: Keyboard with scroll, how to make it work?

Use Xmodmap to change what that "key" does.

Try it out in a terminal window. Once you get it to work, you can add it to your init script.

Offline

#8 2011-01-20 21:21:52

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

drcouzelis wrote:

Use Xmodmap to change what that "key" does.

Try it out in a terminal window. Once you get it to work, you can add it to your init script.

Yeah man, but what I need to know is the keysym or whatever is called the scrolling function, is it XF86ScrollUp and XF86ScrollDown or what?

Last edited by sushi (2011-01-20 21:24:38)

Offline

#9 2011-01-20 21:55:15

heleos
Member
From: Maine, USA
Registered: 2007-04-24
Posts: 678

Re: Keyboard with scroll, how to make it work?

heleos@erebus:~/ > xmodmap -pk | grep XF86Scroll
    185         0x1008ff78 (XF86ScrollUp)       0x0000 (NoSymbol)       0x1008ff78 (XF86ScrollUp)
    186         0x1008ff79 (XF86ScrollDown)     0x0000 (NoSymbol)       0x1008ff79 (XF86ScrollDown)
heleos@erebus:~/ > 

Looks like they are what you thought

Offline

#10 2011-01-21 13:38:40

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

Yeah I know, but the only problem is that I've assigned those functions and runned xmodmap, the keyfunctions were changed but I'm still not getting the scroll to work.. :sad

Last edited by sushi (2011-01-21 13:39:33)

Offline

#11 2011-01-21 15:02:51

Awebb
Member
Registered: 2010-05-06
Posts: 6,286

Re: Keyboard with scroll, how to make it work?

Then show us what you did and we tell you what went wrong.

Offline

#12 2011-01-21 16:16:46

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Keyboard with scroll, how to make it work?


Mr Green

Offline

#13 2011-01-21 20:22:17

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

Awebb wrote:

Then show us what you did and we tell you what went wrong.

What I did was to find the keycodes of the keyboard's scroll wheel using xev, than created xmod file using

xmodmap -pke > ~/.xmod

after that I opened the file and searched the keycodes I had found before and changed their original values to XF86ScrollUp and XF86ScrollDown,runned this command

xmodmap ~/.xmod

runned xev again and the values were changed but the scroll wheel is still not scrolling at all. I was wondering if there is another way to call the scrolling function other than XF86Scroll... or at least someone could say what I'm doing wrong...

Last edited by sushi (2011-01-21 20:24:04)

Offline

#14 2011-01-21 20:39:32

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Keyboard with scroll, how to make it work?

sushi wrote:

What I did was to find the keycodes of the keyboard's scroll wheel using xev, than created xmod file using

xmodmap -pke > ~/.xmod

after that I opened the file and searched the keycodes I had found before and changed their original values to XF86ScrollUp and XF86ScrollDown,runned this command

xmodmap ~/.xmod

runned xev again and the values were changed but the scroll wheel is still not scrolling at all. I was wondering if there is another way to call the scrolling function other than XF86Scroll... or at least someone could say what I'm doing wrong...

From my limited testing, XF86Scroll* don't actually cause anything to scroll. You need to map the keys to send scroll up/down button events. (Mr Green's link is about mapping buttons to send key events.) Have a look at xbindkeys or your WM configuration. One utility that can send button events is xdotool.

[correction: 'bind', not 'map']

Last edited by Peasantoid (2011-01-21 20:40:32)

Offline

#15 2011-01-21 21:21:47

sushi
Member
Registered: 2011-01-19
Posts: 8

Re: Keyboard with scroll, how to make it work?

Peasantoid wrote:
sushi wrote:

What I did was to find the keycodes of the keyboard's scroll wheel using xev, than created xmod file using

xmodmap -pke > ~/.xmod

after that I opened the file and searched the keycodes I had found before and changed their original values to XF86ScrollUp and XF86ScrollDown,runned this command

xmodmap ~/.xmod

runned xev again and the values were changed but the scroll wheel is still not scrolling at all. I was wondering if there is another way to call the scrolling function other than XF86Scroll... or at least someone could say what I'm doing wrong...

From my limited testing, XF86Scroll* don't actually cause anything to scroll. You need to map the keys to send scroll up/down button events. (Mr Green's link is about mapping buttons to send key events.) Have a look at xbindkeys or your WM configuration. One utility that can send button events is xdotool.

[correction: 'bind', not 'map']

I kinda understood what you're saying, so I need to bind my keyboard scroll wheel to actually scroll anything, I'm using now xbindkeys_config, but now the same doubt comes up, if I wanna bind the scroll wheel to do scroll what is the action I have to assign to the key? Since you said XF86Scroll doesn't cause anything to scroll, what does then?

Last edited by sushi (2011-01-21 21:31:10)

Offline

#16 2011-01-22 23:34:41

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: Keyboard with scroll, how to make it work?

sushi wrote:

I kinda understood what you're saying, so I need to bind my keyboard scroll wheel to actually scroll anything, I'm using now xbindkeys_config, but now the same doubt comes up, if I wanna bind the scroll wheel to do scroll what is the action I have to assign to the key? Since you said XF86Scroll doesn't cause anything to scroll, what does then?

Maybe I didn't specify clearly. Revision of my post:

Peasantoid wrote:

You need to map the keys to send scroll up/down [mouse] button events.

In other words, set up a bind such that when you move the keyboard wheel (which sends a keyboard event), a mouse button event is generated. Take a look at the xdotool man page.

Note that this will only work if the cursor is over what you're trying to scroll.

This workaround shouldn't even be necessary -- I find it odd that the wheel isn't sending mouse events in the first place. evdev (the Linux input subsystem) should support devices with both keyboard and mouse capabilities.

Last edited by Peasantoid (2011-01-22 23:35:01)

Offline

Board footer

Powered by FluxBB