Skip to content

Commit

Permalink
Edit code to disable my workaround for an issue fixed in an earlier c…
Browse files Browse the repository at this point in the history
…ommit to make it *actually* fixed
  • Loading branch information
Arian04 committed Nov 25, 2022
1 parent 76aa1a2 commit 6eec280
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/src/main/java/me/arianb/usb_hid_client/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,9 @@ private void convertAndAddKeyToQueue(String key) {

// Toggles the presence of a modifier in the Set of modifiers
// In other words, if the modifier is in the set, remove it, if the modifier isn't, add it.
// FIXME: The "remove" part of this is currently commented out because for some reason, sometimes
// keys send their modifiers twice, which adds, then immediately removes it, leading to an unmodified key
// - this means that currently, modifiers cannot be deselected once pressed for a key
private void addModifier(byte modifier) {
if(modifiers.contains(modifier)) {
modifiers.add(modifier);
//modifiers.remove(modifier);
modifiers.remove(modifier);
} else {
modifiers.add(modifier);
}
Expand Down

0 comments on commit 6eec280

Please sign in to comment.