From 9ab20a0ada1b55b9fa281821b733571c2d5e60d6 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Wed, 27 Feb 2019 21:33:42 -0300 Subject: [PATCH] Fix songsearch pasting --- .../ScreenSelectMusic decorations/songsearch.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/songsearch.lua b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/songsearch.lua index 49f7a6c15f..c9971be3f8 100644 --- a/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/songsearch.lua +++ b/Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/songsearch.lua @@ -25,12 +25,12 @@ local function searchInput(event) searchstring = "" elseif event.DeviceInput.button == "DeviceButton_=" then searchstring = searchstring .. "=" - elseif event.DeviceInput.button == "DeviceButton_v" and CtrlPressed then - searchstring = searchstring .. HOOKS:GetClipboard() else + local CtrlPressed = INPUTFILTER:IsControlPressed() + if event.DeviceInput.button == "DeviceButton_v" and CtrlPressed then + searchstring = searchstring .. HOOKS:GetClipboard() + elseif --if not nil and (not a number or (ctrl pressed and not online)) - local CtrlPressed = INPUTFILTER:IsBeingPressed("left ctrl") or INPUTFILTER:IsBeingPressed("right ctrl") - if event.char and event.char:match('[%%%+%-%!%@%#%$%^%&%*%(%)%=%_%.%,%:%;%\'%"%>%<%?%/%~%|%w]') and (not tonumber(event.char) or CtrlPressed) then