Oops, actually, your current code doesn't work :) If you have no recent projects, it properly selects "Open Folder", but hitting ENTER doesn't activate it. This is because the key-handling code actually looks at `$dropdownItem`. (I didn't realize it was a module global. The key handling code should probably just look for the item that currently has `.selected` applied, but that's a separate issue.)

So you need to set `$dropdownItem` in both cases. I would probably just get rid of `$dropdownFirstItem` and do something like:

```
var $links = $dropdown.find("a");
// By default, select the most recent project (which is at the top of the list underneath Open Folder),
// but if there are none, select Open Folder instead.
$dropdownItem = $links.eq($links.length > 1 ? 1 : 0);
```