Delete whitespace left and right in Notepad++

Solution 1:

There is no shortcut by default, but you can easily add one using the shortcut mapper. The action to remove leading and trailing space is found in Edit > Blank operations > Remove leading and trailing space

You can map it by going to Settings > Shortcut Mapper... > Then scrolling to whichever one you want (such as 29) and double clicking on the cell under Shortcut.

Solution 2:

I didn't find the actions you've asked for,
but could suggest a simple search-and-replace pattern:

Search: \h+(\w+)\h+
Replace: _$1_ (the '_' character here represents a blank character)

You could also write a short macro for that -
see here for a list of predefined Notepad++ shortcut-keys:

Lists of default mouse and keyboard shortcuts for Notepad++ and some plugins