Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sinister Zeta Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sinister Zeta
Sinister Zeta Project
Commits
903c15e6
Commit
903c15e6
authored
3 years ago
by
Dallin Nickel (djn011)
Browse files
Options
Downloads
Patches
Plain Diff
Unregister keys after removing
parent
0465ddb6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!65
Prototype
,
!52
Feature addmacros
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Controller/Action.java
+11
-17
11 additions, 17 deletions
src/Controller/Action.java
src/ui/MainScreen.java
+1
-0
1 addition, 0 deletions
src/ui/MainScreen.java
with
12 additions
and
17 deletions
src/Controller/Action.java
+
11
−
17
View file @
903c15e6
package
Controller
;
import
model.Hotkey
;
import
model.OSInterface
;
import
java.util.ArrayList
;
public
class
Action
{
/**
* a list of keycodes which need to be sent
*/
ArrayList
<
Integer
>
keyCodes
;
/**
* a constructor to create a new Action list
* @param keys a list of keyCodes
*/
public
Action
(
ArrayList
<
Integer
>
keys
){
this
.
keyCodes
=
keys
;
}
/**
* calls all the keycodes in the list
*/
public
void
preformAction
(){
for
(
Integer
i:
keyCodes
){
OSInterface
.
getInstance
().
sendKey
(
i
,
true
);
}
}
/**
* return all the keys in the action
* @return keys in the action
...
...
@@ -35,4 +19,14 @@ public class Action {
public
ArrayList
<
Integer
>
getKeys
(){
return
this
.
keyCodes
;
}
/**
* calls all the keycodes in the list
*/
public
void
preformAction
(){
//for each keycode in the list, preform it
for
(
Integer
keyCode:
this
.
getKeys
()){
OSInterface
.
getInstance
().
sendKey
(
keyCode
,
true
);
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/ui/MainScreen.java
+
1
−
0
View file @
903c15e6
...
...
@@ -391,6 +391,7 @@ public class MainScreen extends Pane {
remove
.
setOnAction
(
e
->
{
dict
.
remove
(
i
);
primaryStage
.
setScene
(
mainScreenScene
);
OSInterface
.
getInstance
().
unregisterHotkey
(
i
);
});
BV
.
getChildren
().
add
(
remove
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment