Disable accels while in typing mode

,

Is there a way in gtk to disable an accel (particularly when in some kind of a typing mode)?
Isn’t there any way to prioritize local key-events over global ones or just a function to disable one particular shortcut for a particular context?