don't propogate control + arrow key if a slider is focused.

This fixes an issue where moving a slider may move the window as well.
This commit is contained in:
onyx-and-iris 2026-03-20 02:05:00 +00:00
parent d54995dbf1
commit 92f357f003
2 changed files with 12 additions and 6 deletions

View File

@ -310,14 +310,16 @@ class Popup:
f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}' f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}'
) )
self.popup[f'COMPRESSOR||SLIDER {param}'].bind( self.popup[f'COMPRESSOR||SLIDER {param}'].bind(
f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}' f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}', propagate=False
) )
if param == 'RELEASE': if param == 'RELEASE':
self.popup[f'COMPRESSOR||SLIDER {param}'].bind( self.popup[f'COMPRESSOR||SLIDER {param}'].bind(
f'<Alt-{event}-{direction}>', f'||KEY ALT {direction.upper()} {event_id}' f'<Alt-{event}-{direction}>', f'||KEY ALT {direction.upper()} {event_id}'
) )
self.popup[f'COMPRESSOR||SLIDER {param}'].bind( self.popup[f'COMPRESSOR||SLIDER {param}'].bind(
f'<Control-Alt-{event}-{direction}>', f'||KEY CTRL ALT {direction.upper()} {event_id}' f'<Control-Alt-{event}-{direction}>',
f'||KEY CTRL ALT {direction.upper()} {event_id}',
propagate=False,
) )
self.popup[f'COMPRESSOR||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R') self.popup[f'COMPRESSOR||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R')
self.popup['MAKEUP'].bind('<FocusIn>', '||FOCUS IN') self.popup['MAKEUP'].bind('<FocusIn>', '||FOCUS IN')
@ -642,14 +644,16 @@ class Popup:
f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}' f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}'
) )
self.popup[f'GATE||SLIDER {param}'].bind( self.popup[f'GATE||SLIDER {param}'].bind(
f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}' f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}', propagate=False
) )
if param in ('BPSIDECHAIN', 'ATTACK', 'HOLD', 'RELEASE'): if param in ('BPSIDECHAIN', 'ATTACK', 'HOLD', 'RELEASE'):
self.popup[f'GATE||SLIDER {param}'].bind( self.popup[f'GATE||SLIDER {param}'].bind(
f'<Alt-{event}-{direction}>', f'||KEY ALT {direction.upper()} {event_id}' f'<Alt-{event}-{direction}>', f'||KEY ALT {direction.upper()} {event_id}'
) )
self.popup[f'GATE||SLIDER {param}'].bind( self.popup[f'GATE||SLIDER {param}'].bind(
f'<Control-Alt-{event}-{direction}>', f'||KEY CTRL ALT {direction.upper()} {event_id}' f'<Control-Alt-{event}-{direction}>',
f'||KEY CTRL ALT {direction.upper()} {event_id}',
propagate=False,
) )
self.popup[f'GATE||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R') self.popup[f'GATE||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R')
self.popup['Exit'].bind('<FocusIn>', '||FOCUS IN') self.popup['Exit'].bind('<FocusIn>', '||FOCUS IN')

View File

@ -251,7 +251,9 @@ class NVDAVMWindow(psg.Window):
f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}' f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}'
) )
self[f'STRIP {i}||SLIDER {param}'].bind( self[f'STRIP {i}||SLIDER {param}'].bind(
f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}' f'<Control-{event}-{direction}>',
f'||KEY CTRL {direction.upper()} {event_id}',
propagate=False,
) )
self[f'STRIP {i}||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R') self[f'STRIP {i}||SLIDER {param}'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R')
@ -284,7 +286,7 @@ class NVDAVMWindow(psg.Window):
f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}' f'<Shift-{event}-{direction}>', f'||KEY SHIFT {direction.upper()} {event_id}'
) )
self[f'BUS {i}||SLIDER GAIN'].bind( self[f'BUS {i}||SLIDER GAIN'].bind(
f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}' f'<Control-{event}-{direction}>', f'||KEY CTRL {direction.upper()} {event_id}', propagate=False
) )
self[f'BUS {i}||SLIDER GAIN'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R') self[f'BUS {i}||SLIDER GAIN'].bind('<Control-Shift-KeyPress-R>', '||KEY CTRL SHIFT R')