Author Topic: Additional keybindings for accessibility by impaired users  (Read 1617 times)

Offline DoctorWizard

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Doctor Wizard's Giant Musical Holiday Light Show
Additional keybindings for accessibility by impaired users
« on: July 23, 2019, 08:56:05 AM »
Hey guys!  I really wanted to meet you and shake your hands at the Expo but you were eating lunch and I didn't want to disturb you.  After that, my friend I was riding with was not feeling well and we had to leave.

I have mild Parkinson's and have some trouble using a regular mouse or trackball.  I try to do as much with the keyboard as possible.  As a side effect of my disability, I have collected quite an eclectic assortment of alternative input devices.  You may have seen my post on Facebook regarding using foot pedals to play/pause and ffwd/rewind.

I like the Ctrl-Shift-0 thru 9 to jump to 0%-90% of the sequence, but better yet would be keys or bindings to move back and forth by 25-50ms or one cell (a more finely grained ffwd/rewind).
Ctrl-0 thru 9 to jump to a marker is also nice, but they can only be set by a right click of the mouse, so a way to set them from the keyboard would be helpful.
Ctrl-. and Ctrl-/ are not working for me in Windows (haven't tried it in Linux yet).

I'm also a developer (although C++ is not my strong point) and I downloaded the source code and have been trying to figure out how/where to implement additional key bindings.  I quickly found the obvious KeyBindings.cpp, but can you give me clues on where in the code keystrokes are actually handled (after binding) and where positioning of the play cursor is handled?

And thank you for all your time and effort you put into this free software!

Offline Gilrock

  • Supporting Member
  • Hero Member
  • *
  • Posts: 6946
    • View Profile
Re: Additional keybindings for accessibility by impaired users
« Reply #1 on: July 27, 2019, 06:49:19 AM »
There is no central place that handles keyboard input.  Its spread out in many places because each different window area will handle its own keystrokes.

Offline DoctorWizard

  • Newbie
  • *
  • Posts: 15
    • View Profile
    • Doctor Wizard's Giant Musical Holiday Light Show
Re: Additional keybindings for accessibility by impaired users
« Reply #2 on: July 28, 2019, 10:15:07 AM »
So what section controls the media player, it's display, and it's position?  And do you think this is even doable without tremendous amounts of work?  My C++ skills are kinda "meh".
(I use C/C++ mostly for microcontroller stuff, for Windows GUI stuff, I tend to use C#, haven't tackled the Linux Desktop GUI yet.)

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: Additional keybindings for accessibility by impaired users
« Reply #3 on: July 28, 2019, 04:16:30 PM »
It is going to vary. Some things are pretty simple to add. Other things are really hard and need to be added in multiple places.

Offline keithsw1111

  • Administrator
  • Hero Member
  • *****
  • Posts: 2733
    • View Profile
    • Kellyville Christmas Lights
Re: Additional keybindings for accessibility by impaired users
« Reply #4 on: August 06, 2019, 02:59:05 AM »
So a chance to respond more fully to this.

In .39 I will add a new keybinding FOCUS_SEQUENCER which must be assigned to a function key. This will fix some situations in the sequencer when it wont accept the key input (which happens because the focus jumps to a control). Setting it to say F12 lets you force focus back to the sequencer so the keys work again.

You asked where are the keys handled. Basically in 3 locations

xLightsMain.cpp xLightsFrame::HandleAllKeyBinding
LayoutPanel.cpp LayoutPanel::HandleLayoutKeyBinding
MainSequencer.cpp MainSequencer::HandleSequencerKeyBinding

That is the easy part ... making it do something useful is much harder.

In .38 I added some auto scrolling when using cell selection and arrow keys in sequencer that may help.

Part of the problem you will face is scrolling the waveform and moving the timing marker are not one and the same thing ... most of the key bindings just scroll the waveform ... they dont move the song position. One that does is the house preview jump forward/backward 10 seconds buttons that you could model off.

As for adding keybindings for setting and removing timeline markers i am not super keen on that ... just too many things i would want to do and no simple way to do it without creating dozens of key definitions. We already have so many and almost no one uses them.