summaryrefslogtreecommitdiff
path: root/src/xkb.xml
AgeCommit message (Collapse)AuthorFilesLines
2013-08-15xkb: Add missing LedClass and BellClass enum valuesRan Benita1-3/+7
The protocol encoding says: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Common_Types KB_LEDCLASSRESULT 0 KbdFeedbackClass 4 LedFeedbackClass KB_LEDCLASSSPEC Encoding same as KB_LEDCLASSRESULT, with the addition of: #x0300 XkbDfltXIClass #x0500 XkbAllXIClasses KB_BELLCLASSRESULT 0 KbdFeedbackClass 5 BellFeedbackClass KB_BELLCLASSSPEC Encoding same as KB_BELLCLASSRESULT, with the addition of: #x0300 XkbDfltXIClass Note that the spec says something slightly different in another section: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#Common_Types KB_LEDCLASSSPEC { KbdFeedbackClass , LedFeedbackClass , DfltXIClass , AllXIClasses , XINone } KB_BELLCLASSSPEC { KbdFeedbackClass , BellFeedbackClass , DfltXIClass , AllXIClasses }} From what I could gather, the encoding is the correct one (but I'm not sure). Signed-off-by: Ran Benita <ran234@gmail.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15xkb: Add missing 'supported' field to GetNamedIndicator replyRan Benita1-0/+1
The protocol encoding has it: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests 1 CARD8 opcode 1 15 xkb-opcode [...] 1 1 Reply 1 CARD8 deviceID 2 CARD16 sequence number [...] 4 SETofKB_BOOLCTRL map.ctrls 1 BOOL supported 3 unused And xkbGetNamedIndicatorReply in XKBproto.h also. Finally, the server does send it, though it's always TRUE. Signed-off-by: Ran Benita <ran234@gmail.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-08-15xkb: Unify Overlay1Behavior and Overlay2BehaviorRan Benita1-12/+6
These two structs are used by the server in the exact same way, and are handled together (see xkb/xkbPrKeyEv.c, XkbKB_Overlay{1,2} handling). There is no need to use different (and for some reason slightly different) types for them. Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15xkb: Change DfltBtnAbsolute to the value used by the serverRan Benita1-1/+2
The spec says: #x02 XkbSA_DfltBtnAbsolute But /usr/include/X11/extensions/XKB.h has: #define XkbSA_DfltBtnAbsolute (1L << 2) which is what the server sends. Note: the XKB spec was changed by Daniel Martin to match the Xlib value. See kbproto commit db07706cb268d5fe1bc38ef5c0a9f49309068b2c. Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15xkb: Fix key type map entry field orderRan Benita1-4/+0
In fact, unlike the deleted comment says, both Xlib and the server use the order as specified in the protocol spec: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests (Search for KB_KTMAPENTRY). Also see struct xkbKTMapEntryWireDesc in /usr/include/X11/extensions/XKBproto.h Reviewed-by: Peter Harris <pharris@opentext.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Ran Benita <ran234@gmail.com>
2013-08-15xkb: Work around alignment problems in GetNames and GetMap repliesRan Benita1-0/+70
The basic situation is this: a list of CARD8/CARD16s followed by a list of CARD16/CARD32s. In the current code, the second list is aligned to 1/2 bytes according the size of the first list. However, in some cases the second list needs to be aligned to 4 bytes per the xkbproto spec: http://www.x.org/releases/current/doc/kbproto/xkbproto.html#appD::Requests XkbGetMap reply (xkb-opcode 8): [...] a LISTofCARD8 actsRtrn.count p unused,p=pad(a) 8A LISTofKB_ACTION actsRtrn.acts 4B LISTofKB_SETBEHAVIOR behaviorsRtrn v LISTofSETofKEYMASK vmodsRtrn p unused, p=pad(v) 2E LISTofKB_SETEXPLICIT explicitRtrn p unused,p=pad(2E) 2M LISTofKB_KEYMODMAP modmapRtrn p unused, p=pad(2M) [...] XkbGetNames reply (xkb-opcode 17): [...] l LISTofCARD8 nLevelsPerType, sum of all elements=L p unused, p=pad(l) [...] The server and Xlib handle this with calls to XkbPaddedSize(), which is a good way to see where the extra padding is needed. Signed-off-by: Ran Benita <ran234@gmail.com> Reviewed-by: Daniel Martin <consume.noise@gmail.com>
2013-05-30XKB: Correct enum to maskMark Witmer1-18/+18
Changes fields with enums EventType, MapPart, or BoolCtrl to use them as masks instead.
2013-04-16XKB: Fix calculation in GetIndicatorMapPeter Harris1-1/+1
Contrary to the spec, the server doesn't set nIndicators. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Fix GetKbdByNamePeter Harris1-271/+23
Each part of the reply has a fake type, sequence, and length. In addition, some parts of the reply are encoded only once even when multiple bits are set. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Change CARD8 to char where ASCII is expectedPeter Harris1-4/+4
This does not impact libxcb, but it makes some pretty-printers prettier. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Fix VirtualModsPeter Harris1-3/+3
nVModMapKeys is usually larger than <popcount>virtualMods</popcount>. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Fix SymInterpretPeter Harris1-16/+24
SymInterpret is referenced by the spec, but never defined. Therefore, the definition of SymInterpret is inferred from the server implementation. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Fix CountedString16 paddingPeter Harris1-1/+17
Should be <pad align=4>, not <pad bytes=1>. This is a very long-winded way to write <pad align>, since libxcb doesn't support <pad align> yet. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-04-16XKB: Remove CountedString8Peter Harris1-7/+0
CountedString8 is never used. Signed-off-by: Peter Harris <pharris@opentext.com>
2013-02-14xkb: Revert half of d42d791 XKB: Fix broken eventsDaniel Martin1-24/+12
The no-sequence-number attribute was not necessary to achive what commit d42d791 did. The first field automatically goes between the response_type and the sequence field in the header. So, adding the xkbType field would've been sufficient to fix the broken events. Reference-to: d42d791 XKB: Fix broken events
2012-06-21XKB: Fix broken eventsDaniel Stone1-12/+36
XKB events all have exactly the same event number - 0 (from the XKB event base). Within this, they're all multiplexed by the xkbType field, which comes immediately after the event type field, before the sequence number. Without this field, the events are pretty much useless, so add it manually. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Uli Schlachter <psychon@znc.in> Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11Fix XKB GetState missing lookupMods fieldRobert Ancell1-0/+1
This fixes #43606 Signed-off-by: Julien Danjou <julien@danjou.info>
2012-01-11Fix some fields nameRobert Ancell1-3/+3
XKB-SetControls has some incorrectly named fields according to the spec, interanlRealMods -> internalRealMods, Internal where Ignore should be used. This fixes #43605 Signed-off-by: Julien Danjou <julien@danjou.info>
2010-10-20[xkb] Rename type, sequence, and lengthPeter Harris1-3/+3
These fields are already defined by the protocol. Rename them to avoid potential name collisions. Signed-off-by: Peter Harris <pharris@opentext.com>
2010-08-16xcbgen: small fix to store anchestor objects more systematicChristoph Reimann1-1/+16
xml: small fixes according to Xlib or the spec
2010-07-22support name attribute for bitcases and set BitcaseType.has_name accordinglyChristoph Reimann1-8/+8
2010-03-29xkb: Fix opcode for Bell and GetState requestsPeter Harris1-2/+2
Reviewed-by: Ian Osgood <iano@quirkster.com> Signed-off-by: Peter Harris <pharris@opentext.com>
2010-02-10Collection of small fixes for xkb.xmlPeter Harris1-43/+29
These were discovered while updating the wireshark dissector: - Clean up "ID" enum definition and usage - Clean up XIFeature masks - Use SetOfGroup (not Group) for masks - Use LedClass as an enum, not as a mask
2010-02-08Add XKEYBOARD protocol descriptionPeter Harris1-0/+2773
Thanks to Mariusz Ceier <mceier@gmail.com> for starting this work, and to Google's Summer of Code for sponsoring the initial work. Signed-off-by: Peter Harris <pharris@opentext.com>