/etc/sysconfig/x11
is where the keycodes that modify the mouse button are defined.
Now these are mapped to shift and Fn, it works because they are modifiers they do nothing except to modify the next key pressed.
If you just change the previous file with the ok and cancel keycode, it won't work well (if it works at all ) because you will get a lot "Esc" and "Enter" keys sent to the current application.
It is possible to make the 2 keys act like shift and Fn (ie they won't do return and esc) but is it what you want?
Moreover, when you change these settings (the keycode for the mouse),
you must restart X so that they take effect: it's not easy to change the keys for landscape/portrait on the fly.
Please ask if what I say is not clear enough.
maybe using xmonobut from:
http://www.pdaxrom.org/ipk_feed.phpis a better solution?
(it's pre RC5, but I believe it's still working, though I didn't try it recently)