             cell.cancelButtonCell!.action = #selector(EditDeck.cancelSearch(_:))
         }
 
+        NSNotificationCenter.defaultCenter()
+            .addObserver(self,
+                         selector: #selector(EditDeck.updateTheme(_:)),
+                         name: "theme",
+                         object: nil)
+
+        initKeyboardShortcuts()
+    }
+
+    deinit {
+        NSNotificationCenter.defaultCenter().removeObserver(self)
+    }
+
+    func initKeyboardShortcuts() {
         NSEvent.addLocalMonitorForEventsMatchingMask(.KeyDownMask) { (e) -> NSEvent? in
             let isCmd = e.modifierFlags.contains(.CommandKeyMask)
 

                // distinguish between numpads and numbers above qwerty etc..
                //
                guard let charsPressed = e.charactersIgnoringModifiers,
                          numberPressed = Int(charsPressed.charAt(0)),
                          visibleCardIndexPaths = self.cardsCollectionView
                                                      .indexPathsForVisibleItems()
                                                  as? [NSIndexPath]
                    where 1 ... visibleCardIndexPaths.count ~= numberPressed
                    else { return e }

                if let cell = self.cardsCollectionView
                                  .cellForItemAtIndexPath(visibleCardIndexPaths[numberPressed - 1])
                              as? CardCell,
                       card = cell.card {

                    self.addCardToDeck(card)
                    return nil
                }
                
                Log.verbose?.message("unsupported keycode \(e.keyCode)")
            }

            return e
        }
        NSNotificationCenter.defaultCenter()
            .addObserver(self,
                         selector: #selector(EditDeck.updateTheme(_:)),
                         name: "theme",
                         object: nil)
    }

    deinit {
        NSNotificationCenter.defaultCenter().removeObserver(self)
    }

    func setDelegate(delegate: NewDeckDelegate) {

                case 1: // cmd-s
                    self.save(nil)
                    return nil

                default:
                    break
