diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..e049f92
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..e049f92
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon_hires.png b/icon_hires.png
new file mode 100644
index 0000000..1c10d3a
--- /dev/null
+++ b/icon_hires.png
Binary files differ
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..e049f92
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon_hires.png b/icon_hires.png
new file mode 100644
index 0000000..1c10d3a
--- /dev/null
+++ b/icon_hires.png
Binary files differ
diff --git a/layout.xml b/layout.xml
new file mode 100644
index 0000000..3f658eb
--- /dev/null
+++ b/layout.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..e049f92
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon_hires.png b/icon_hires.png
new file mode 100644
index 0000000..1c10d3a
--- /dev/null
+++ b/icon_hires.png
Binary files differ
diff --git a/layout.xml b/layout.xml
new file mode 100644
index 0000000..3f658eb
--- /dev/null
+++ b/layout.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/meta.prop b/meta.prop
new file mode 100644
index 0000000..b32d8c1
--- /dev/null
+++ b/meta.prop
@@ -0,0 +1,5 @@
+meta.id: Unified.PlexKeyboardPlus
+meta.name: Plex Media Player+
+meta.author: Unified+Mark Bavis
+meta.description: Control Plex Media Player
+meta.tags.category: media
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..e049f92
--- /dev/null
+++ b/icon.png
Binary files differ
diff --git a/icon_hires.png b/icon_hires.png
new file mode 100644
index 0000000..1c10d3a
--- /dev/null
+++ b/icon_hires.png
Binary files differ
diff --git a/layout.xml b/layout.xml
new file mode 100644
index 0000000..3f658eb
--- /dev/null
+++ b/layout.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/meta.prop b/meta.prop
new file mode 100644
index 0000000..b32d8c1
--- /dev/null
+++ b/meta.prop
@@ -0,0 +1,5 @@
+meta.id: Unified.PlexKeyboardPlus
+meta.name: Plex Media Player+
+meta.author: Unified+Mark Bavis
+meta.description: Control Plex Media Player
+meta.tags.category: media
diff --git a/remote.lua b/remote.lua
new file mode 100644
index 0000000..9a025ec
--- /dev/null
+++ b/remote.lua
@@ -0,0 +1,130 @@
+local kb = libs.keyboard;
+local win = libs.win;
+local log = require("log");
+
+events.detect = function ()
+ if OS_WINDOWS then
+ return libs.fs.exists("C:\\Program Files\\Plex\\Plex Media Player");
+ elseif OS_OSX then
+ return libs.fs.exists("/Applications/Plex Home Theater.app") or libs.fs.exists("/Applications/Plex.app") or libs.fs.exists("/Applications/Pley Media Player.app");
+ end
+end
+
+--@help Focus Plex application
+actions.switch = function()
+ if OS_WINDOWS then
+ local hwnd = win.window("PlexMediaPlayer.exe");
+ if (hwnd == 0) then
+ actions.launch();
+ return false;
+ else
+ local active = win.active();
+ if (active == hwnd) then return true; end
+ win.switchtowait("PlexMediaPlayer.exe");
+ return false;
+ end
+ end
+end
+
+--@help Launch Plex application
+actions.launch = function()
+ if OS_WINDOWS then
+ log.info("LAUNCHING");
+ pcall(function ()
+ os.start("c:\\Program Files\\Plex\\Plex Media Player\\PlexMediaPlayer.exe");
+ end);
+
+ elseif OS_OSX then
+ os.script("tell application \"Plex Home Theater\" to activate");
+ os.script("tell application \"Plex\" to activate");
+ os.script("tell application \"Plex Media Player\" to activate");
+ end
+ for i = 1,10,1
+ do
+ local hwnd = win.window("PlexMediaPlayer.exe");
+ if (hwnd ~= 0) then break; end
+ os.sleep(1000);
+ end
+ log.info("LAUNCHED AND SWITCHING");
+ win.switchtowait("PlexMediaPlayer.exe");
+end
+
+--@help Navigate back
+actions.back = function ()
+ if (actions.switch()) then kb.press("esc"); end
+end
+
+--@help Play pause
+actions.play_pause = function ()
+ if (actions.switch()) then kb.press("space"); end
+end
+
+--@help Seek forward
+actions.forward = function ()
+ if (actions.switch()) then kb.press("right"); end
+end
+
+--@help Seek rewind
+actions.rewind = function ()
+ if (actions.switch()) then kb.press("left"); end
+end
+
+--@help Navigate home
+actions.home = function ()
+ if (actions.switch()) then kb.press("h"); end
+end
+
+--@help Stop playback
+actions.stop = function ()
+ if (actions.switch()) then kb.press("x"); end
+end
+
+--@help Play current item
+actions.play_current = function ()
+ if (actions.switch()) then kb.press("space"); end
+end
+
+--@help Play select item
+actions.select = function ()
+ if (actions.switch()) then kb.press("enter"); end
+end
+
+--@help Play volumeup item
+actions.volumeup = function ()
+ if (actions.switch()) then kb.press("oem_plus"); end
+end
+
+--@help Play volumeup item
+actions.volumedown = function ()
+ if (actions.switch()) then kb.press("oem_minus"); end
+end
+
+--@help Navigate left
+actions.left = function ()
+ if (actions.switch()) then kb.press("left"); end
+end
+
+--@help Navigate down
+actions.down = function ()
+ if (actions.switch()) then kb.press("down"); end
+end
+
+--@help Navigate right
+actions.right = function ()
+ if (actions.switch()) then kb.press("right"); end
+end
+
+--@help Navigate up
+actions.up = function ()
+ if (actions.switch()) then kb.press("up"); end
+end
+
+--@help Select
+actions.select = function ()
+ if (actions.switch()) then kb.press("return"); end
+end
+
+--@help Toggle Fullscreen
+actions.fullscreen = function ()
+ if (actions.switch()) then kb.stroke("alt", "return"); end
+end
\ No newline at end of file