PDA

View Full Version : Key maps


MrJackdaw
09-12-2010, 02:36 AM
Is there a simple command for the keymaps?

I want a plugin I am writing to sort the packs to fire when I hit shift-b, but have no idea how to trap the 'b' key. SetWantsKeyUpdates first obviously, but then?

Pengoros
09-12-2010, 09:21 PM
Is there a simple command for the keymaps?

I want a plugin I am writing to sort the packs to fire when I hit shift-b, but have no idea how to trap the 'b' key. SetWantsKeyUpdates first obviously, but then?
I'm not aware of any key to code mapping files being available. If I want to find out a key code I just turn the SetWantsKeyUpdates to true and then start printing out args.Action in the KeyDown method to figure out what the code is.

MrJackdaw
09-13-2010, 12:22 AM
Thanks, will do!

Digital_Utopia
09-19-2010, 08:23 PM
KeyDown args doesn't actually return a keycode, but rather an action. Bad news is that it sucks for those of us who are trying to write keyboard shortcuts, but good news is we don't have to worry about what the user has their keybindings set as when we want to react to them doing something.