From b1c5d88edc57b99975365b6c6f75f536cd4345ec Mon Sep 17 00:00:00 2001 From: Andrew Kwon Date: Sun, 15 Sep 2019 14:01:35 -0700 Subject: [PATCH 1/3] Allow transitions to URL mode from entity mode --- src/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/init.lua b/src/init.lua index c02f5f0..596e688 100644 --- a/src/init.lua +++ b/src/init.lua @@ -309,6 +309,11 @@ Ki.defaultTransitionEvents = { function() Ki.state:exitMode() end, { "Entity Mode", "Exit to Normal Mode" }, }, + { + {"cmd"}, "u", + function() Ki.state:enterUrlMode() end, + { "Entity Mode", "Transition to URL Mode" }, + }, { {"cmd"}, "f", function() Ki.state:enterFileMode() end, @@ -406,6 +411,7 @@ Ki._defaultStateEvents = { { name = "enterBrightnessControlMode", from = "normal", to = "brightness" }, { name = "enterUrlMode", from = "normal", to = "url" }, { name = "enterUrlMode", from = "select", to = "url" }, + { name = "enterUrlMode", from = "entity", to = "url" }, { name = "exitMode", from = "normal", to = "desktop" }, { name = "exitMode", from = "entity", to = "desktop" }, { name = "exitMode", from = "file", to = "desktop" }, From fbfcb92371dea142fc57ac903893173b026ecddd Mon Sep 17 00:00:00 2001 From: Andrew Kwon Date: Sun, 15 Sep 2019 14:42:30 -0700 Subject: [PATCH 2/3] Implement menu item selection event helper method --- docs/html/Application.html | 33 ++++++++++++ docs/markdown/Application.md | 9 ++++ spec/application.spec.lua | 3 ++ src/application.lua | 52 +++++++++++++++++- src/defaults.lua | 1 + src/entities/preview.lua | 27 ++-------- src/entities/quicktime-player.lua | 58 +++++++++++++++------ src/entities/text-edit.lua | 27 ++-------- src/osascripts/quicktime-player.applescript | 42 +++++++++++++++ 9 files changed, 186 insertions(+), 66 deletions(-) create mode 100644 src/osascripts/quicktime-player.applescript diff --git a/docs/html/Application.html b/docs/html/Application.html index 3ae62f1..5192d41 100644 --- a/docs/html/Application.html +++ b/docs/html/Application.html @@ -27,6 +27,7 @@

API Overview

  • Methods - API calls which can only be made on an object returned by a constructor