D25191: replace bespoke xkb geometry parser with xkb

Harald Sitter noreply at phabricator.kde.org
Thu Nov 7 13:17:58 GMT 2019


sitter created this revision.
sitter added a reviewer: Plasma.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
sitter requested review of this revision.

REVISION SUMMARY
  the bespoke parser was a horrendous drain on the build time of
  plasma-desktop due to recursive templates.
  it's been replaced with a new standalone binary that previews any
  model/layout/variant/options combination as requested and a qtquick UI
  which simplifies the actual rendering substantially.
  
  the new code is better in that it:
  
  - builds in a fraction of the time with a fraction of the power use
  - renders complex models (such as the tm2020 or the kinesis) correctly
  - because it entirely relies on xkb to figure out keysyms belonging to a given key, it's layout representation is not only substantially more complete it also correctly obeys options like eurosign:2
  - renders numlock and the like (not that this is in fact very useful ^^)
  - is following the system palette for coloring
  - the paint code should be easier to graps and more robust because xkb provides completely consistent geometry and layout data meaning we can model this verbatim in qtquick and then scale the entire keyboard to a useful size
  - this is now a standalone application so potential input method KCMs can opt to use it (e.g. fcitx)

TEST PLAN
  preview all the layouts and all the models

REPOSITORY
  R119 Plasma Desktop

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D25191

AFFECTED FILES
  kcms/keyboard/CMakeLists.txt
  kcms/keyboard/config-keyboard.h.cmake
  kcms/keyboard/kcm_add_layout_dialog.cpp
  kcms/keyboard/kcm_add_layout_dialog.h
  kcms/keyboard/kcm_keyboard_widget.cpp
  kcms/keyboard/kcm_keyboard_widget.h
  kcms/keyboard/preview/TODO
  kcms/keyboard/preview/geometry_components.cpp
  kcms/keyboard/preview/geometry_components.h
  kcms/keyboard/preview/geometry_parser.cpp
  kcms/keyboard/preview/geometry_parser.h
  kcms/keyboard/preview/kbpreviewframe.cpp
  kcms/keyboard/preview/kbpreviewframe.h
  kcms/keyboard/preview/keyaliases.cpp
  kcms/keyboard/preview/keyaliases.h
  kcms/keyboard/preview/keyboardlayout.cpp
  kcms/keyboard/preview/keyboardlayout.h
  kcms/keyboard/preview/keyboardpainter.cpp
  kcms/keyboard/preview/keyboardpainter.h
  kcms/keyboard/preview/keysym2ucs.cpp
  kcms/keyboard/preview/keysym2ucs.h
  kcms/keyboard/preview/keysymbols.cpp
  kcms/keyboard/preview/keysymbols.h
  kcms/keyboard/preview/keysymhelper.cpp
  kcms/keyboard/preview/keysymhelper.h
  kcms/keyboard/preview/symbol_parser.cpp
  kcms/keyboard/preview/symbol_parser.h
  kcms/keyboard/tastenbrett.cpp
  kcms/keyboard/tastenbrett.h
  kcms/keyboard/tastenbrett/CMakeLists.txt
  kcms/keyboard/tastenbrett/README.md
  kcms/keyboard/tastenbrett/application.cpp
  kcms/keyboard/tastenbrett/application.h
  kcms/keyboard/tastenbrett/doodad.cpp
  kcms/keyboard/tastenbrett/doodad.h
  kcms/keyboard/tastenbrett/foobar.cpp
  kcms/keyboard/tastenbrett/foobar.h
  kcms/keyboard/tastenbrett/geometry.cpp
  kcms/keyboard/tastenbrett/geometry.h
  kcms/keyboard/tastenbrett/key.cpp
  kcms/keyboard/tastenbrett/key.h
  kcms/keyboard/tastenbrett/main.cpp
  kcms/keyboard/tastenbrett/outline.cpp
  kcms/keyboard/tastenbrett/outline.h
  kcms/keyboard/tastenbrett/qml.qrc
  kcms/keyboard/tastenbrett/qml/IndicatorDoodad.qml
  kcms/keyboard/tastenbrett/qml/Key.qml
  kcms/keyboard/tastenbrett/qml/KeyCap.qml
  kcms/keyboard/tastenbrett/qml/KeyCapLabel.qml
  kcms/keyboard/tastenbrett/qml/ShapeCanvas.qml
  kcms/keyboard/tastenbrett/qml/ShapeDoodad.qml
  kcms/keyboard/tastenbrett/qml/TextDoodad.qml
  kcms/keyboard/tastenbrett/qml/main.qml
  kcms/keyboard/tastenbrett/row.cpp
  kcms/keyboard/tastenbrett/row.h
  kcms/keyboard/tastenbrett/section.cpp
  kcms/keyboard/tastenbrett/section.h
  kcms/keyboard/tastenbrett/shape.cpp
  kcms/keyboard/tastenbrett/shape.h
  kcms/keyboard/tastenbrett/xkbobject.cpp
  kcms/keyboard/tastenbrett/xkbobject.h
  kcms/keyboard/tests/CMakeLists.txt
  kcms/keyboard/tests/geometry_parser_test.cpp
  kcms/keyboard/xkb_rules.cpp
  kcms/keyboard/xkb_rules.h

To: sitter, #plasma
Cc: plasma-devel, LeGast00n, The-Feren-OS-Dev, jraleigh, fbampaloukas, GB_2, ragreen, ZrenBot, ngraham, alexeymin, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, ahiemstra, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20191107/10c30318/attachment-0001.html>


More information about the Plasma-devel mailing list