Skip to content

Commit

Permalink
Move hotkey event logging to a more useful place
Browse files Browse the repository at this point in the history
So that key down/up events are logged, too.
  • Loading branch information
jyrkive committed Feb 24, 2018
1 parent 1742166 commit fbeba25
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hotkey/command_executor.cpp
Expand Up @@ -527,13 +527,14 @@ void key_event(const SDL_Event& event, command_executor* executor)
static void event_execute( const SDL_Event& event, command_executor* executor)
{
if (!executor) return;

LOG_HK << "event 0x" << std::hex << event.type << std::dec << std::endl;

const hotkey_ptr hk = get_hotkey(event);
if (!hk->active() || hk->is_disabled()) {
return;
}

LOG_HK << "event 0x" << std::hex << event.type << std::dec << std::endl;

bool press = event.type == SDL_KEYDOWN ||
event.type == SDL_JOYBUTTONDOWN ||
event.type == SDL_MOUSEBUTTONDOWN ||
Expand Down

0 comments on commit fbeba25

Please sign in to comment.