lastinv is not only Q, it can be mwheelup or down or any other button a client binded to lastinv.
And the other one is slot2 i think.
When you want to know the command bound to a certain button, type "bind button" in console and it will show the current command bound to the button.
like
__________________