Need advise on keyboard shortcuts migration

Jérôme Guelfucci jeromeg at xfce.org
Wed Dec 19 15:49:58 CET 2012


Hello,

As you may have noticed, I have been working on improving the keyboard 
shortcuts code.

My current branches (jeromeg/keyboard-shortcuts) of libxfce4ui and 
xfce4-settings already fix some long-standing bugs and I'm currently 
trying to finish fixing bug #8200. The code there already handles 
<Control> as well as <Primary> so grabbing / detecting those shortcuts 
is not a problem, but handling shortcut conflicts sure is one.

The current shortcut conflict handling is based on comparing Xfconf 
properties except that now, <Control> and <Primary> are the same thing 
so we can't rely on that. <Control> won't be used in new installations 
but I still need a way to handle "upgrades".

I don't want to add checks all hover the place to handle this and think 
best way to move forward is to replace those shortcuts with their 
<Primary> equivalent. I for one did a brutal "sed -i 
's/Control/Primary/g' xfce4-keyboard-shortcuts.xml"...

How would you do that? A migration script using something like 
xmlstarlet to edit only the name field of the shortcuts in the XML file 
could be a solution.

Help is appreciated!

Cheers,

Jérôme


More information about the Xfce4-dev mailing list