1 | // returns true if success |
2 | static bool reactToWindowsKeyOpt(final Runnable r) { |
3 | new Android3 a; |
4 | a.startPort = 4989; |
5 | a.useMultiPort = false; // We want the real port! |
6 | a.responder = makeResponder(new O { |
7 | S answer(S s) { |
8 | new Matches m; |
9 | if "windows key pressed" |
10 | r.run(); |
11 | null; |
12 | } |
13 | }); |
14 | makeBot(a); |
15 | if (a.port == a.startPort) { |
16 | print("Windows key assigned."); |
17 | true; |
18 | } |
19 | a.dispose(); |
20 | print("Could not assign Windows key (port " + a.startPort + " taken)"); |
21 | false; |
22 | } |
Began life as a copy of #1003539
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003542 |
Snippet name: | reactToWindowsKeyOpt |
Eternal ID of this version: | #1003542/1 |
Text MD5: | b037e3890159796d8c36b7d5db688fda |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-07-17 17:51:44 |
Source code size: | 540 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 535 / 595 |
Referenced in: | [show references] |