Send keycode *and* shift to layer?

Since the Key_PcApplication requests a context menu, I’d like to be automatically shifted to the (Fn) layer containing the navigation keys with which to navigate the menu. Is it possible to both send a keystroke and get shifted (locked) to a layer upon a keystroke?

What you want is not a layer shift – that specifically refers to the layer becoming active only while the key is held. But you could get what you want by using a macro that sends a press & release of Key_PcApplication, then a press & release of LockLayer(N) (or possibly a OneShot layer, if you generally just want the layer shift to apply to the next keystroke only).


Am I correct in assuming that I should use Tr() and not T() for the LockLayer key? So:

return MACRODOWN(T(PcApplication), Tr(LockLayer(NAVIGATION)));

Yes, you are correct, and should be using Tr() for LockLayer.