You cannot change actions/actionlists for buttons via script.
If you need 2 different action lists to execute depending on state, I recommend that you create 2 buttons with same ProntoScript Name on 2 separate hidden pages and then use executeActions() or scheduleActions() against the correct widget/button.
In the onscreen button (the one you'd press for Key A on your keyboard), do something like the following.
if (keyboardState == 0) // unshifted CF.widget("KeyA", "Unshifted").scheduleActions(); else if (keyboardState == 1) // shifted CF.widget("KeyA", "Shifted").scheduleActions();
In the action of your shift key, you'd simply set the appropriate keyboard state. Note that keyboardState is a variable you declare in you activity or in the page script of the page where the GUI keyboard is contained.
Also note that the "Unshifted" and "Shifted" strings above are the ProntoScript names that you assign to the hidden pages where you have your keyboard buttons that contain the actions you want to execute for each state.