[JOSM] How to map a function to a keyboard shortcut?

How can I assign a keyboard shortcut to a function? I’d like to assign the new function “Edit → Copy coordinates” to a shortcut…