Opera is the only one (which use Qt) on mine. I have already tried scite, and the problem is the same as yours. This is why I am thinking that the problem may (or may not) be related to gtk.
I would like to know, when you run xev, what does it gave to you?
On my computer, it seem to be fine, the "state" is correct for F1 and shift+F1, and keysim is the good one too (0xffbe here).
I have bind xev to codeblocks, with the id provided by xwininfo, but I do not understand results at all: they are all the same...