fixing keymappings

This commit is contained in:
langolierz
2019-07-14 12:06:23 +00:00
parent 85421c59fb
commit 638bde828f
4 changed files with 24 additions and 19 deletions

View File

@@ -32,7 +32,7 @@ class Actions(object):
self.server = self.setup_osc_server()
def set_capture_object(self, value):
if self.data.settings['video']['VIDEO_BACKEND']['value'] != 'omxplayer':
if self.data.settings['video']['VIDEOPLAYER_BACKEND']['value'] != 'omxplayer':
self.python_capture.close_capture()
self.capture = self.of_capture
else:
@@ -137,7 +137,7 @@ class Actions(object):
def cycle_display_mode(self):
display_modes = [["BROWSER",'NAV_BROWSER'],["SETTINGS",'NAV_SETTINGS'],[ "SAMPLER",'PLAYER']]
if self.data.settings['video']['VIDEO_BACKEND']['value'] == 'openframeworks':
if self.data.settings['video']['VIDEOPLAYER_BACKEND']['value'] != 'omxplayer':
display_modes.append(["SHADERS",'NAV_SHADERS'])
if self.data.settings['detour']['TRY_DEMO']['value'] == 'enabled':
display_modes.append(["DETOUR",'NAV_DETOUR'])
@@ -451,12 +451,12 @@ class Actions(object):
#### check if in dev mode:(ie not using the lcd screen)
with open('/boot/config.txt', 'r') as config:
if '##no_waveshare_overlay' in config.read():
self.data.update_setting_value('other','DEV_MODE_RESET', 'on')
self.data.update_setting_value('system','DEV_MODE_RESET', 'on')
else:
self.data.update_setting_value('other','DEV_MODE_RESET', 'off')
self.data.update_setting_value('system','DEV_MODE_RESET', 'off')
def check_if_should_start_openframeworks(self):
if self.data.settings['video']['VIDEO_BACKEND']['value'] != 'omxplayer':
if self.data.settings['video']['VIDEOPLAYER_BACKEND']['value'] != 'omxplayer':
self.openframeworks_process = subprocess.Popen(['/home/pi/openFrameworks/apps/myApps/c_o_n_j_u_r/bin/c_o_n_j_u_r'])
print('conjur pid is {}'.format(self.openframeworks_process.pid))

View File

@@ -1,3 +1,4 @@
keycode 82=a
keycode 86=b
keycode 22=c
@@ -12,12 +13,24 @@ keycode 106=j
keycode 80=k
keycode 84=l
keycode 88=m
!note: the code will map 000 to n in the code
!note: the python code will map 000 to n in the code
keycode 77=o
keycode 79=p
keycode 83=q
keycode 87=r
keycode 90=s
keycode 118=BackSpace
!note: for developing im going to use insert for backspacing
!note some keypads calculate numlock + keys internally needing more things to be mapped
keycode 60=i
keycode 112=f
keycode 114=g
keycode 117=h
keycode 119=i
keycode 111=k
keycode 116=m
keycode 110=p
keycode 113=q
keycode 115=r
keycode 118=s

View File

@@ -70,7 +70,7 @@
"value": "auto"
}
},
"user_inputs": {
"user_input": {
"MIDI_CHANNEL": {
"action": null,
"options": [
@@ -337,7 +337,7 @@
],
"value": "black"
},
"VIDEO_BACKEND": {
"VIDEOPLAYER_BACKEND": {
"action": "switch_video_backend",
"options": [
"omxplayer",
@@ -387,14 +387,6 @@
],
"value": "hdmi"
},
"VIDEOPLAYER_BACKEND": {
"action": "switch_conjur_player_type",
"options": [
"omxPlayer",
"ofPlayer"
],
"value": "ofPlayer"
},
"SCREEN_MODE": {
"action": null,
"options": [

View File

@@ -135,7 +135,7 @@ class VideoDriver(object):
def reset_all_players(self):
self.exit_all_players()
state = self.data.settings['video']['VIDEO_BACKEND']['value']
state = self.data.settings['video']['VIDEOPLAYER_BACKEND']['value']
if(state == 'ofvideoplayer' or state == 'ofxomxplayer'):
self.last_player = AltVideoPlayer(self.root, self.message_handler, self.data, self.osc_client, 'a.a')
self.current_player = AltVideoPlayer(self.root,self.message_handler, self.data, self.osc_client, 'b.b')