Editing new records

My opinion:

  1. When creating new records the name field should be focused automatically.
  2. When a log is saved, there should be way to continue with a new log.

Is it possible to adopt hotkey/shortcut keys into FarmOS?

2 Likes

Interesting ideas @pat!

When creating new records the name field should be focused automatically.

Good idea. I bet this could be accomplished with some simple JavaScript.

When a log is saved, there should be way to continue with a new log.

This is a neat idea! Implementing it might be complicated because there are numerous contexts that may lead you to creating a log, however, and not all of them would need/want this feature. So it might require some deeper scoping to think it through.

Is it possible to adopt hotkey/shortcut keys into FarmOS?

I’ve never done anything with hotkeys in Drupal before - I wonder what’s possible! Or perhaps a more generic JS approach? Do you have experience with either?

Nothing automatic. I was thinking more some kind of button or url to click on for a new entry, so the
This button could be focued, of course so an Enter or Space keypresspress would activate it.

No experience. How about this hotkey module?

Maybe it could simplify saving entries too. Instead of scrolling for the save button.

Ctrl-Shift S for activating the Save button :heart_eyes:
Ctrl-Shift N for activating a New activity log button :heart_eyes:

1 Like

I came across that too… no releases and hasn’t been updated since 2014, so it appears to be dead. :frowning:

Also found this one, but it seems a bit different: https://www.drupal.org/project/keyboard_shortcuts

@pat this is a neat idea!

It’s for a slightly different problem, but a similar tool I’ve come across is the Drupal coffee module that provides a quick-search feature for navigating Drupal admin pages. The search UI is activated with the alt + D or alt + K keys and displays results as you start typing.

I started a simple farm_coffee module that adds some custom commands for farmOS assets, logs and plans. You can type :add log and it will take you directly to the Add log or Add {log type} page, depending on which result you choose. There’s also shortcuts for Assets and Logs listing pages.

2 Likes