Created
May 21, 2019 21:59
-
-
Save Petethegoat/065d51452bda4adf6c902cc9c32f6625 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
local function onKeyDown(e) | |
if e.keyCode == tes3.worldController.inputController.inputMaps[20].code then | |
journalKey = e.keyCode | |
tes3.worldController.inputController.inputMaps[20].code = nil | |
if tes3ui.findMenu(menuBook) then | |
tes3ui.findMenu(menuBook):findChild(menuBook_button_close):triggerEvent("mouseClick") | |
tes3ui.leaveMenuMode() | |
else | |
showJournalUI() | |
end | |
end | |
end | |
event.register("keyDown", onKeyDown) | |
local function onKeyUp(e) | |
if e.keyCode == journalKey then | |
tes3.worldController.inputController.inputMaps[20].code = journalKey | |
end | |
end | |
event.register("keyUp", onKeyUp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment