Commit Graph

157 Commits

Author SHA1 Message Date
Peter Hutterer
ff6251a2bd Remove unused EvdevOpts and EvdevOptions.
In the mouse driver, these options are only used if XFree86LOADER is
undefined. configure.ac in the xserver forces said define to 1 if we're
building the xfree86 DDX, so I don't see the point of having them around.
Especially since they weren't used in evdev anyway.
2008-05-19 08:24:55 +09:30
Peter Hutterer
e9222a8285 man: Option "Path" is supported in the code, add it to man page. 2008-05-18 11:04:43 +09:30
Peter Hutterer
8b7738457f Don't allow relative and absolute axes on the same device.
This is a bit of a mess. The MS Optical Desktop 2000 registers both relative
and absolute axes on the same device (the mouse). The absolute axes have a
valid min/max range for x/y and thus overwrite the x/y relative axes in the
server (no, this is not a server bug). And I wouldn't be surprised if other
devices have similar issues.

Since the device only sends relative events after that, the mouse is
essentially restricted to the min..max range of 0..255. The server simply
doesn't do unrestricted relative axis and restricted absolute axis on the same
device (not for the same axis numbers anyway).
2008-05-02 11:17:57 +09:30
Sascha Hlusiak
1b9deb8e7e Add XK_Meta_L and XK_Meta_R to list of modifiers
Stopps meta/super key from autorepeating
2008-04-01 17:24:13 +02:00
Daniel Stone
0ec391f51c Keyboard: Don't allow arbitrary keymap settings
Pretty much dead code anyway.
2008-03-28 17:46:38 +02:00
Adam Jackson
f77410e1f9 Map REL_DIAL to REL_HWHEEL.
Some Microsoft mice have this wrong.  And it seems like a sensible thing
to do anyway.
2008-03-14 11:15:01 -04:00
Adam Jackson
d28c2e1efb Filter out repeat events for mouse buttons.
Not many mice do this, but some do, Apple Mighty Mouse in particular, and
it makes click-and-drag pretty much impossible to use.

Arguably we should filter _all_ repeat events from the kernel and handle
synthesizing them in the server.
2008-03-12 13:54:10 -04:00
Adam Jackson
697e850a63 Fix middle/right button munging.
Don't do this in the button map.  That's writeable by clients, which means
they have the chance to get it wrong.  Just swap right and middle around
in event dispatch before you get to the user's map.
2008-03-11 19:07:58 -04:00
Adam Jackson
87037b9953 Force xkb_model to be "evdev".
Or at least, refuse to recognise the config option.  It's nonsensical to
use a model of something other than evdev, and it'll just break if you try.
2008-03-10 17:16:38 -04:00
Dan Nicholson
71f4eaec77 Fix cut-and-paste errors in xkb alternate spellings code
Fixes 2b334d6b69.
2008-03-09 22:52:13 +01:00
Adam Jackson
7208397612 Fix cut-and-paste error in abs-to-rel translation. 2008-03-09 16:15:14 -04:00
Adam Jackson
c250f84383 Fix the default XKB rules to be "base" instead of "xfree86". 2008-03-09 15:54:27 -04:00
Adam Jackson
2b334d6b69 Handle the alternate spellings of the xkb options. 2008-03-09 15:53:40 -04:00
Adam Jackson
9773dac623 Merge branch 'evdev-2.0-branch'
This resets to before the ad-hoc input hotplug state, ports that to
current server ABI, adds input hotplug integration, and re-adds support
for absolute coordinate events and XKB.  Several other small fixes were
cherry-picked from the new 1.2 branch.
2008-03-08 20:27:02 -05:00
Adam Jackson
1a0bc8e64a Force maximum keycode to be 255
Even though we don't have keycodes for anything above 127, make sure our
map always covers up to 255.  This ensures that the keycode range never
changes.

Spiritually cherry-picked from a9e87f29cc
and 6db4a9fb84.
2008-03-08 20:06:24 -05:00
Adam Jackson
6271494faa Add absolute coordinate event support.
There are two major classes here, touchscreens and touchpads.  Touchpads
are logically more like relative devices, in that your initial touch
should not warp the cursor.  So attempt to detect touchpads (via the
existence of BTN_TOUCH) and translate absolute events from those devices
to relative motion.
2008-03-08 19:54:44 -05:00
Adam Jackson
f5bfc7ec3c Nuke the keyboard bell code.
It did nothing, and the core won't invoke it anymore anyway.
2008-03-08 16:52:17 -05:00
Adam Jackson
bf0848ec8e Re-add XKB support.
Almost entirely taken from a patch I did ages ago in bug #3912, with
slight cleanups, and with the KcCGST options removed as per evdev 1.x.
2008-03-08 16:50:20 -05:00
Adam Jackson
f1445feac7 Parse Option "Path" as well as Option "Device".
The hotplug core passes Path not Device.  With this change, hotplugging
works.
2008-03-08 16:09:47 -05:00
Adam Jackson
ad5bdcb50f Ignore button events above BTN_TASK for now. 2008-03-07 20:29:58 -05:00
Adam Jackson
bb36ca65c6 Support the new DIX motion history API
Spiritually cherry-picked from 036b457c1b
2008-03-07 19:43:07 -05:00
Daniel Stone
40a1e1439c remove XFree86LOADER usage
Build evdevModuleData, et al, unconditionally.
2008-03-07 19:38:33 -05:00
Adam Jackson
946beb16f8 Unlibcwrap. 2008-03-07 19:09:35 -05:00
Adam Jackson
305f90d37a Branch for evdev 2.0 2008-03-07 19:06:14 -05:00
Sascha Hlusiak
11cf9c92c0 Updated manpage to reflect current state
Large parts of the manpage were obsolete and confused users. Current state should reflect all available driver options. Some details are still missing.
2008-03-03 13:40:52 +02:00
Sascha Hlusiak
7f1e8146d4 More accurate error messages on device open fail.
The message "cannot open input pEvdev" resulted in a lot of bug reports of confused users that did not
supply a device path. Now we tell them when it is missing or print out a reason when device open fails.
2008-02-20 20:41:08 +01:00
Sascha Hlusiak
8ae4d17ca3 Let kernel autorepeat pass when set on default values
xorg-server won't generate soft autorepeat, when interval/delay are at default of 40/660 (see xkb/ddxCtrls.c:
XkbDDXUsesSoftRepeat). When we hit the defaults, we let the kernel autorepeat pass, if we differ, we swallow them all
and let the server figure out autorepeat in software.
2008-02-19 22:49:51 +01:00
Sascha Hlusiak
134ce2e493 Set repeat_delay and repeat_interval to default values
Set ctrls->repeat_delay and ctrls->repeat_interval so that keys will be automatically repeated in software.
2008-02-19 21:12:36 +01:00
Sascha Hlusiak
10e7c3fbdf Filter all incoming repeated key events
Not just filter modifiers but every repeated key, because the software implementation will take care of what key to
repeat and what not. Otherwise the kernel's autorepeated keys interfere with the software generated ones.
2008-02-19 21:09:13 +01:00
Sascha Hlusiak
f766404fd9 Don't inform kernel evdev driver about autorepeat change
We do autorepeat in software now. Informing the kernel would change the autorepeat speed on virtual terminals, which is
probably not wanted so we leave the settings untouched.
2008-02-19 21:05:49 +01:00
Vinay Bondhugula
d032d3c8b4 Clear EV_ABS_V_USE_TOUCH for devices without a touch button
VMware's absolute pointing device does not have a pressure/touch button.
Although evdev correctly recognizes this, it sets "use_touch" for X and Y axes
regardless of the touch button. This patch clears the USE_TOUCH flag for the X
and Y axes if the device does not have a touch button.
2008-01-29 22:15:22 -08:00
Peter Hutterer
5adbc6b98c Initialise b_map_data to correct size. Bug #13991
X.Org Bug 13991 <http://bugs.freedesktop.org/show_bug.cgi?id=13991>
2008-01-29 14:07:49 +10:30
Julien Cristau
eeb3727004 Don't flush buttons on init (bug#12630) 2007-12-07 17:02:11 +01:00
Peter Samuelson
fa15e90993 Fix one additional typo in evdev.man (axis named BRAKE, not BREAK). xf86-input-evdev-1.2.0 2007-10-11 07:27:30 +02:00
Peter Samuelson
12a27693b9 evdev.man minor fixes
* Use \- (ASCII dash) instead of - (hyphen), where appropriate
* Use a roff escape instead of a UTF-8 character.
* Consistent use of quote characters.
* Consistent use of typographic conventions:
  italic "n" in place of "<N>" or "integer" or "number",
  bold for option names, bit maps, etc.

Debian bug #446118
2007-10-11 00:09:40 +02:00
James Cloos
1c40c7db18 Add *~ to .gitignore to skip patch/emacs droppings 2007-09-03 05:52:08 -04:00
Daniel Stone
e2be2ffa47 Options: Accept differently-named options
Take some differently-named options for device and the XKB options.  These
should really be better-handled, but eh.
2007-08-07 15:44:33 +03:00
Brice Goglin
e86aab93c5 Multiple typos in evdev.man
Reported by "A. Costa" <agcosta@gis.net> in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432063
2007-07-26 18:31:58 +02:00
Tiago Vignatti
c69f4bd570 Clean up a little bit the code. 2007-06-15 01:35:29 -03:00
Tiago Vignatti
64677ecc76 Remove inotify things. 2007-06-15 01:33:49 -03:00
Zephaniah E. Hull
08a09682f5 Update version using PACKAGE_VERSION_*. 2007-06-13 11:05:07 -04:00
Zephaniah E. Hull
9c9a47210a Move the mode option handling to the Init stage.
(Sorta ugly placement wise, but the other segfaults.)
2007-06-12 11:59:16 -04:00
Zephaniah E. Hull
2d2c4804f9 evdev.c:
Set and use the X mode control, letting XInput see it properly.

    Kill some cruft.

evdev.h:

    Set and use the X mode control, letting XInput see it properly.

evdev_axes.c:

    Set and use the X mode control, letting XInput see it properly.

evdev_key.c:

    Remove some cruft, the bell func can be NULL now, so do so.

    Don't bother looking for keys above 0xF7 until we can actually do
    something with them.
2007-06-11 09:08:24 -04:00
Zephaniah E. Hull
6b97bf7a4e Handle default remapping around existing button targets better. 2007-06-06 05:00:29 -04:00
Zephaniah E. Hull
5c6b3dd86f Move MapButtons_t closer to where it's used. 2007-06-06 04:42:51 -04:00
Zephaniah E. Hull
f15636ac52 Wheel mice work again!
(Old configs don't.)

evdev.c:

    Add EvdevParseMapToButton and EvdevParseMapToButtons to evdev_map_parsers.

    Add EvdevParseMapOption to search through evdev_map_parsers.

    Fix up EvdevTokenize to handle the evdev_option_token_t changes.

    EvdevAxesNew0 after BtnNew0 instead of before now.
    (This isn't the right fix.)

evdev.h:

    EVDEV_MAXBUTTONS -> BTN_MAX.

    Redid evdevBtnRec with the new mapping goodness.

    Removed v_min and v_max from evdevAbsRec.

    Reworked evdev_option_token_t, no union, no is_chain.
    If it's a chain, it still has a string, but the chain pointer is set.

    EvdevParseMapToButton, EvdevParseMapToButtons, and EvdevParseMapOption.

evdev_axes.c:

    Kill off EvdevAxesMapButton, a variant lives in evdev_btn.c now.

    Changes for the evdev_option_token_t changes.

    Use EvdevParseMapOption instead of repeating the contents twice.

    Disable EV_ABS_V_INVERT for the moment. (Better fix maybe needed.)

evdev_btn.c:

    s/Ptr /Rec */g

    EvdevMapButton and parser.

    EvdevMapButtons and parser.

    Nuke EvdevBtnCalcRemap as a whole.

    Move everything but the alloc to New1 from New0.

    New mapping code, same guts os the axes mapping code even.
2007-06-06 04:41:54 -04:00
Zephaniah E. Hull
276685fa1d Fix REL mode.
Make buttons mostly work again. (Short term fix.)

NOTE: Wheel to button remapping is still missing!
2007-06-05 23:55:50 -04:00
Zephaniah E. Hull
27a86f8168 Update the copyright notices for me to include 2007.
Finish merging copyright notices. (evdev_key.c was missed.)
2007-06-05 23:19:59 -04:00
Zephaniah E. Hull
26dbf38041 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-input-evdev
Conflicts:

	src/evdev.h
2007-06-05 23:14:46 -04:00
Zephaniah E. Hull
294355842b Alright, this is a really big commit that breaks stuff.
evdev.h:

    Switch to flags in the abs and rel structs.

    Add the axes struct, and defines.

    Rework the abs and rel structs, moving stuff to the axes struct and moving
    everything to the new mapping handling.

    Add the structs and function declarations for the new tokenization stuff,
    parsing stuff, and mapping stuff.

evdev.c: Add EvdevTokenize, and the evdev_map_parsers list.

evdev_axes.c:

    Basicly a full rewrite, big, messy.

    We now use a completely different mapping setup for axes, and mapping to
    buttons is currently missing.

    However we now handle ABS_CALIB and ABS_AREA, including rotation in both
    rel and abs modes.

evdev_btn.c:

    Disable lots of code and break things horribly, we compile but we don't
    work very well.

    Fixing this is next on my todo list.
2007-06-05 23:12:58 -04:00