This is what I would done:
Open leoSettings.leo, there is a menu command in the Settings menu.
Look at the node:
@settings-->Keyboard shortcuts-->@keys EKR bindings-->@shortcuts Cursor Moves
There you can see commands for moving cursor in the body pane and their default shortcuts.
To select word you can see there is a command named `extend-to-word` which by default is bound to Ctrl-w.
Then you can open LeoPyRef.leo (and make your own copy of that file with the name LeoPy.leo). Then you can use quick search or find to search for the string `extend-to-word` and you would get the node at the:
Code-->Command classes-->@file ../commands/editCommands.py-->class EditCommandsClass-->ec: move cursor-->ec.extend-to-word
There is the implementation of the command, so you can learn how it is done and perhaps find what you need to change to get the effect you want.
But you should not change that function. Instead you should copy the code to a new node and change it there. You can then make a script button out of this node but first you should change the headline to something like this:
my-new-word-search-command @key=Ctrl-Shift-f
Of course you should give it a meaningful name and choose shortcut to your liking. When you make script button by clicking in the button in toolbar with the label `script-button`, the code inside this node and its subtree will be bound to the shortcut and every time you press this key combination the code will be executed.
As I understand you wish to start search for the word containing cursor and only in the current body. The script to do this is as follows:
c.editCommands.extendToWord(None)
c.frame.nav.children()[4].setCurrentIndex(4)
c.executeMinibufferCommand('find-quick-selected')
To construct this script I had to look in leoPlugins.leo in the quicksearch.py plugin, to find that c.frame.nav is the widget representing 'Nav' pane. To find that combo box is the child at index 4, I used small script:
for ch in c.frame.nav.children():
g.es(ch.objectName())
Looking in the combo box you can find that the item at index 4 is 'Node' for searching only inside current node.
Once you are satisfied with the command, you can change its headline to be '@command <name of command> @key=<shortcut>' , then copy and paste it in your myLeoSettings.leo under the `@settings` node. Every time you start Leo after this, it will have this command bound to your shortcut just as if it were a command implemented in the Leo core.
HTH Vitalije