libwacom icon indicating copy to clipboard operation
libwacom copied to clipboard

tools: de-duplicate and regroup identical hwdb entries

Open whot opened this issue 1 year ago • 0 comments

This sit on top of #694, only the last commit matters.

This should have no functional effect but it reduces the hwdb file from ~10k lines to under 700 non-comment lines.

Entries with identical properties are now grouped together into one list of fallthrough-match strings with the property assignments once the VID changes.

Entries with identical match strings (Huion, Gaomon, etc.) are grouped together into one list of tablet name comments followed by the match string.

Entries are now visually separated by VID too to make it easier to spot the grouping, and the entries are now in this form:

  libwacom:name:*:input:b0003v056Ap5222*                       # ISDv4 5222
  libwacom:name:*:input:b0003v056Ap5229*                       # ISDv4 5229
  libwacom:name:*:input:b0003v056Ap522A*                       # ISDv4 5229
   ID_INPUT=1
   ID_INPUT_TABLET=1
   ID_INPUT_JOYSTICK=0

Or for where multiple tablets share the same hwdb match:

  #                                                             TM156W
  #                                                             U16 TP(4K)
  #                                                             U16(4K)
  #                                                             WH850
  libwacom:name:*:input:b0003v256Cp0064*                       # WH851
  libwacom:name:*:input:b0003v256Cp0066*                       # Inspiroy 2 S
  libwacom:name:*:input:b0003v256Cp0067*                       # Inspiroy 2 M - H951P
  libwacom:name:*:input:b0003v256Cp0068*                       # Inspiroy 2 L - H1061P

whot avatar May 15 '24 00:05 whot