AppleScript detect key press by user alternatives
One way would be to use Hammerspoon to detect key presses as in this example. You could use something like this:
hs.hotkey.bind({&quot;cmd&quot;, &quot;alt&quot;, &quot;ctrl&quot;}, &quot;I&quot;, function()
  ok,result = hs.applescript('tell Application &quot;iTunes&quot; to artist of the current track as string')
    hs.notify.new({title=&quot;Hammerspoon&quot;, informativeText=result}):send()
end)

Pressing ⌘+⌥+ctrl+I will give you a notification with the name of the artist, in this case.