Thread: Key mapping
View Single Post
Old 04-14-2008, 08:10 AM   #1
Code Monkey
sws's Avatar
Join Date: Sep 2007
Location: Madison, WI
Posts: 851
Default Key mapping

I'm trying to find a way to see what key/MIDI event occurred to call the command handler for a plugin. This is a little tricky because a commandid can be mapped to multiple keys/MIDI commands, etc, so it's not as easy as doing a reverse lookup into the accelerator table.

Justin, maybe one of these functions?
// todo: kbd_translateAccelerator, kbd_formatKeyName, kbd_getCommandName, kbd_reprocessMenu
There's a couple hacked ways I could probably do it:
1) Check reaper-kb.ini. Only works if user remapped key.
2) Register "accelerator" and try to match keystrokes with later hookcommand calls.
sws is offline   Reply With Quote