-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1398 from keymapperorg/feature/491-detect-dpad-ke…
…y-events #491 detect dpad key events
- Loading branch information
Showing
100 changed files
with
4,857 additions
and
2,931 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
app/src/main/aidl/io/github/sds100/keymapper/api/IKeyEventRelayService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,37 @@ | ||
package io.github.sds100.keymapper.api; | ||
|
||
import android.view.KeyEvent; | ||
import android.view.MotionEvent; | ||
import io.github.sds100.keymapper.api.IKeyEventRelayServiceCallback; | ||
|
||
interface IKeyEventRelayService { | ||
/** | ||
* Send a key event to the target package that is registered with | ||
* a callback. | ||
* | ||
* callbackID parameter was added in Key Mapper 2.8. | ||
*/ | ||
boolean sendKeyEvent(in KeyEvent event, in String targetPackageName); | ||
boolean sendKeyEvent(in KeyEvent event, in String targetPackageName, in String callbackId); | ||
|
||
/** | ||
* Register a callback to receive key events from this relay service. The service | ||
* checks the process uid of the caller to this method and only permits certain applications | ||
* from connecting. | ||
* | ||
* id parameter was added in Key Mapper 2.8. | ||
*/ | ||
void registerCallback(IKeyEventRelayServiceCallback client); | ||
void registerCallback(IKeyEventRelayServiceCallback client, String id); | ||
|
||
/** | ||
* Unregister all the callbacks associated with the calling package from this relay service. | ||
* | ||
* callbackID parameter was added in Key Mapper 2.8. | ||
*/ | ||
void unregisterAllCallbacks(); | ||
void unregisterCallback(String callbackId); | ||
|
||
/** | ||
* Unregister a callback to receive key events from this relay service. | ||
* Send a motion event to the target package that is registered with | ||
* a callback. | ||
*/ | ||
void unregisterCallback(IKeyEventRelayServiceCallback client); | ||
boolean sendMotionEvent(in MotionEvent event, in String targetPackageName, in String callbackId); | ||
} |
4 changes: 3 additions & 1 deletion
4
app/src/main/aidl/io/github/sds100/keymapper/api/IKeyEventRelayServiceCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
package io.github.sds100.keymapper.api; | ||
|
||
import android.view.KeyEvent; | ||
import android.view.MotionEvent; | ||
|
||
interface IKeyEventRelayServiceCallback { | ||
boolean onKeyEvent(in KeyEvent event, in String sourcePackageName); | ||
boolean onKeyEvent(in KeyEvent event); | ||
boolean onMotionEvent(in MotionEvent event); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
New trigger! 🎉 You can now trigger your key maps from the Bixby button, Power button, a button on your headset, or any other way your device can launch the assistant. | ||
New trigger! 🎉 You can now remap the DPAD buttons on your game controller! | ||
|
||
Joysticks and triggers are coming soon... 😉 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.