Skip to content
Snippets Groups Projects
Commit 354b66f8 authored by Branden's avatar Branden
Browse files

Added functionality to MainScreen goToAddProgram method for launching programs with hotkeys

parent c3a25601
No related branches found
No related tags found
2 merge requests!65Prototype,!63Feature finish launch program
......@@ -12,6 +12,7 @@ import javafx.stage.Stage;
import model.Hotkey;
import model.Modifier;
import model.OSInterface;
import model.ProgramLaunchConverter;
import model.profiles.commands.*;
import model.profiles.entities.profile;
import org.jnativehook.NativeHookException;
......@@ -600,9 +601,9 @@ public class MainScreen extends Pane {
try {
Hotkey newHotkey = new Hotkey(programView.getKeyToBind(), id, Modifier.NONE.val());
// Need to add functionality to add open program as keybind action
System.out.println(programView.getProgramPath());
String str = programView.getProgramPath();
ArrayList<Integer> actionList = new ArrayList<>();
//actionList.add(action.getKeyCode());
actionList = ProgramLaunchConverter.StringToInt(str);
Action newAction = new Action(actionList);
if (check.CheckActive().hasHotkey(newHotkey.getKeyCode())){
Alert alert = new Alert(Alert.AlertType.ERROR, "A binding already exists for that key\nRemove key before reassigning");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment