35 lines
1.1 KiB
Plaintext
35 lines
1.1 KiB
Plaintext
on.keychord_press = function(chord, key)
|
|
if Show_file_dialog then
|
|
keychord_press_on_file_dialog(chord, key)
|
|
return
|
|
end
|
|
if chord == 'C-=' then
|
|
update_font_settings(Current_pane.editor_state.font_height+2)
|
|
elseif chord == 'C--' then
|
|
update_font_settings(Current_pane.editor_state.font_height-2)
|
|
elseif chord == 'C-0' then
|
|
update_font_settings(20)
|
|
elseif not Show_code and chord == 'f3' then
|
|
press_show_button()
|
|
elseif Show_code then
|
|
if chord == 'C-left' then press_previous_pane_button()
|
|
elseif chord == 'C-right' then press_next_pane_button()
|
|
elseif chord == 'f1' then press_run_button()
|
|
elseif chord == 'f2' then press_stop_button()
|
|
elseif chord == 'f3' then press_hide_button()
|
|
elseif chord == 'f4' then press_save_button()
|
|
elseif chord == 'f5' then press_load_button()
|
|
elseif Current_pane.editor_state.cursor_x then
|
|
-- send keys to editor if cursor is visible
|
|
edit.keychord_press(Current_pane.editor_state, chord, key)
|
|
end
|
|
else
|
|
-- editors hidden
|
|
if car.keychord_press then
|
|
call_protected(car.keychord_press, chord, key)
|
|
end
|
|
if car.keypressed then
|
|
call_protected(car.keypressed, key)
|
|
end
|
|
end
|
|
end |