P
P
Pavel2012-04-27 20:33:18
linux
Pavel, 2012-04-27 20:33:18

Qt: event handling for non-standard mouse clicks. How?

I got a4tech N-70FX mouse. There is a program under Windows for it , with which you can assign different actions to different keys, you can select an area to save a picture from the screen, and even assign commands to mouse gestures. Under Linux (Debian 6), everything works (in the sense that all keys work and perform their original functions), but you cannot reassign key commands.

There is a desire to write a similar mouse program for Linux on Qt, hence the question - how to handle non-standard keypress events in Qt? mouse wheel
, LeftButton, RightButton are possible, but how are additional keys named in Qt?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
P
Pavel, 2012-04-27
@FluffyMan

What are you downvoting for? If you know the answer, then share it. Ugh.

N
NickLion, 2012-04-28
@NickLion

Qt5 (judging by the code) promises to add 22 more buttons to the existing 5 now (left, middle, right, forward and back). It means either to compile the alpha version of Qt5, or, as mentioned above, to use platform-specific things.

M
Mezomish, 2012-04-27
@Mezomish

I don’t know how many buttons you have there and whether they correspond to those listed, but still there is something here: qt-project.org/doc/qt-4.8/qt.html#MouseButton-enum

R
Riateche, 2012-04-28
@Riateche

>I have just six keys on the mouse. Like the link you gave.
Take a closer look, there are only 5 keys, of which three are standard.
I googled a lot but didn't find anything about it at all. Looks like Qt doesn't support this feature, you'll have to use platform-specific features.
I strongly recommend not to reinvent the wheel and use the good imwheel program, which is in the repositories and allows you to flexibly assign actions to various mouse buttons and combinations.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question