I use ASDW as my movement keys. My Forage is placed in slot 8 in my Hot Keys. Under the Keyboard tab of the Options menu, choose All from the drop down box. Scroll down until you see:
Hot button 1: 1 -----
Hot button 2: 2 -----
Hot button 3: 3 -----
.......
Hot button 8 initially looks like this:
Hot button 8: 8 ----
Since I use the autorun command all the time (remapped to R), I tend to press the forward movement key (W) very rarely. So I mapped the Hot button 8 key to my right turn (D). Thus, while I'm autorunning, I just tap a little right turn every now and then and it forages automatically. So Hot button 8 will look like this in the Keyboard Options window:
Hot button 8: 8 D
Couple of points:
If you change to a different page in the Hot Buttons, turning right will do whatever is mapped to Hot Button 8. As a workaround, I've simply placed Forage in Hot Button 8 on all pages.
One annoying thing is that if I turn right while in combat I constantly get the 'You cannot forage while in combat' message. Slightly annoying, but made up for with the ease of foraging and constant increases in Forage skill level.
As for automatically putting the foraged items into your inventory, just set up your Forage hot button like this:
/doability x (from 1-6 on your Abilities tab)
/pause 10 (puts a 1 second pause in...if you don't do this, I think it will often skip the next command)
/autoinventory
That's all...hope this helps.
Cheers,
Nunab.