Logger-TXT OSX Dev Diary 2 - All about user preferences

Development of Logger-TXT OSX has been coming along since Dev Diary #1 and is at the point that I can use it daily for log input. I still have my primary script around for accessing recent items, search, corrections, and general comfortability, but overall, I have the OSX app in use for all input.

The focus for the past week was getting the preferences window and its various settings to work. This involved getting the following to work:

Logger-TXT Preferences Window March 5

  • Start at system startup
  • Global hotkey recording and the implementation
  • Log file location setting

Each of these items came with their own hurdles, mostly due to me still being new to Objective-C, but I’m happy with their current implementation. It’s not perfect but they got it to the point that I can actually use the app throughout the day.

Recording Global Shortcuts

To handle all of the shortcut recording I made use of MASShortcut which provides all the shortcut related work in a nice little package. It provides a custom view for the button which handles the initial recording, deleting a shortcut and reverting is something didn’t work. It took a little while to get it all working but I chalk that up to my newness to Xcode as I had some issues getting Carbon included properly. Once Carbon was in, it worked great.

Originally I had the shortcut event listener registered in the preference controller but this caused problems as it would not work unless the preference window was opened at least once. Exposing what was needed from the preference controller, the shortcut constant, and moving that handler registration to the app delegate did the trick.

Currently the shortcut opens the window and brings it to the front, and when pressed again, it will hide the app completely, returning focus to the previous app you used. Since none of this lives in the menu bar, there is a hidden app in the dock. Eventually, that will all be cleaned up and removed from sight.

Observations from day to day use

After using it now for a few days as my main input, there are some areas of improvement.

Autocompletion on Type & Project

It would be nice if there was word completion in the type and project fields since those are often repeated frequently in succession. Maybe even defaulting to the previous type and project if you go to those fields would work. That way, you can quickly tab through the fields, getting the defaults if desired or you can just deal with the main input field, and type and project will be ignored. I will have to play around with it later to see how that works in practice. Defaults would be easier and would leave tabbing for field movement but it might also not be as clear as to what is supposed to happen on submission.

Notification on Save

There needs to be some sort of confirmation that an entry was saved. Right now the window just disappears after submission. I’m aiming to add a visual checkmark indicator in the menu bar once it’s moved and may also play around with using a sound. You can see the disabled settings for it in the image above as it’s not yet implemented.

Shortcut for submitting

Not long after I started using it, I went back and added in support for using command+enter to submit the form without having to use a mouse or tab over to the save button. All of those options work but since adding it, I’ve used nothing but command+enter. I opted for using a modifier key to prevent accidental submission. I really wanted the final submission of the form to be a deliberate act and elsewhere these days, command+enter seems to be pretty standard for submitting a form.


Overall, it’s been interesting teaching my fingers new habits to get used to this method of input to my log. I’m excited about the possibilities that this new interface opens up like word completion and better visual output of log entries. In a week or so I’ll upload another diary post on the progress. I’m hoping by then the app will be moved to the menu bar in its current visual state.

Thank you for coming along with me on this journey; it’s been a great learning experience so far.

See also