How to bind Alt-p to up arrow instead of π

Mac binds alt-p and alt-n to π and ˜. How to make it behave as up and down arrow?


Normally we use ~/Library/KeyBindings/DefaultKeyBinding.dict file to customize some keys.

{
    "~p" = "moveUp:";
    "~n" = "moveDown:"; /* not really works */
}

However I found it does not work for alt-n.

Would you consider to use ctrl-p and ctrl-n instead? It is of standard emacs/readline key combination.