Mori - 2009-12-03

Hello,

Is there a way to make certain keyboard modifications or remappings work only in specific applications?

For instance, I would like the keyboard to disable certain keys when using a browser (safari or firefox), as well as to remap a few keys when using the terminal.  I am currently reading about NSAccessibility protocols and am having some trouble. 

Is there an easy way to tell which application has keyboard focus?