static JPanel showChangeHotkeyForm(fS hotkeyName, S hotkeyDesc) { S hot = currentHotKey(hotkeyName); final JComboBox cb = jComboBox(concatLists(ll("None"), keys(jNativeHook_keyCodes()))); selectItem(cb, hot); ret showFormTitled("Assign Hotkey", "Hotkey description:", jlabel(hotkeyDesc), "Current hotkey:", jlabel(or2(hot, "None")), "New hotkey:", cb, r { S key = nullIfEq("None", selectedItem(cb)); saveTextFile(hotKey_file(hotkeyName), key); infoBox(empty(key) ? "Hotkey removed!" : "Hotkey assigned: " + key); }); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015667 |
Snippet name: | showChangeHotkeyForm |
Eternal ID of this version: | #1015667/6 |
Text MD5: | 1e5ba293272774aee78f30ecfdb015c2 |
Author: | stefan |
Category: | javax / os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-21 12:17:19 |
Source code size: | 572 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 361 / 392 |
Version history: | 5 change(s) |
Referenced in: | [show references] |