<table><tr><td style="">hein added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D8641" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>So if I understand correctly, the Mnemonic stuff currently doesn't seem to have the same aims as KAcceleratorManager does ...</p>

<p>KAcceleratorManager acts on a hierarchy of widgets, traverses it, assigns weights to actionable things and possible mnemonics and overall smartly tries to distribute mnemonics across the hierarchy.</p>

<p>If I understand correctly this is more like a convenience wrapper around QKeySequence::mnemonic() that you can get both the label and a sequence to pass to shortcut to.</p>

<p>I'm not really sure about those static mappings members ... there currently doesn't seem to be any duplicate mnemonic tracking yet, right?</p>

<p>My feeling is that this is still too much boiler plate for the dev. At least within a FormLayout, which has knowledge of what labels go with what, all the assignment should probably just happen automatically without needing to have your own Shortcut {} instances and getting the labels out of the Mnemonic thing. Do you think we can do that somehow?</p>

<p>Overall the code in KAcceleratorManagement is quite good and nicely commented, there's likely stuff of value in there (e.g. the algorithm it uses to weight mnemonic characters).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R169 Kirigami</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8641" rel="noreferrer">https://phabricator.kde.org/D8641</a></div></div><br /><div><strong>To: </strong>mart, Plasma, Kirigami, hein<br /><strong>Cc: </strong>colomar, ngraham, davidedmundson, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, hein<br /></div>