You cannot use the keyboard to do text commands that is NOT allowed.

You can only do one action for one press.

If you make a macro with a text command and then put it on your action bar and activate that with a mapped key then that's fine.

Make sure you have the correct profile activated on your keyboard.