Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

shift arrows

  • Loading branch information...
commit c7a3176ed7a7e1d47959a6ee773ea1bf076ff658 1 parent 2bed260
@keenerd authored
Showing with 14 additions and 2 deletions.
  1. +14 −2 gnuwaterfall.py
View
16 gnuwaterfall.py
@@ -20,7 +20,7 @@
print "use: gnuwaterfall.py <lower freq> <upper freq>"
print " frequencies in hertz"
print " example: gnuwaterfall.py 929e6 930e6"
- print " arrow keys pan and zoom"
+ print " arrow keys pan and zoom (shift for bigger steps)"
print " brackets to adjust gain"
print " click and drag to select"
print " esc to quit"
@@ -117,7 +117,19 @@ def on_draw():
@window.event
def on_key_press(symbol, modifiers):
delta = state.freq_upper - state.freq_lower
- if symbol == key.LEFT:
+ if symbol == key.LEFT and modifiers & key.MOD_SHIFT:
+ state.freq_lower -= delta
+ state.freq_upper -= delta
+ elif symbol == key.RIGHT and modifiers & key.MOD_SHIFT:
+ state.freq_lower += delta
+ state.freq_upper += delta
+ elif symbol == key.UP and modifiers & key.MOD_SHIFT:
+ state.freq_lower += delta * 0.3
+ state.freq_upper -= delta * 0.3
+ elif symbol == key.DOWN and modifiers & key.MOD_SHIFT:
+ state.freq_lower -= delta * 0.75
+ state.freq_upper += delta * 0.75
+ elif symbol == key.LEFT:
state.freq_lower -= delta * 0.1
state.freq_upper -= delta * 0.1
elif symbol == key.RIGHT:
Please sign in to comment.
Something went wrong with that request. Please try again.