<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <action>SearchBookmark</action>
        <scheme>;;;SearchBookMark
;;;Find RehearsalMark by Nils Gey, RTS avoid global
(let ((user-input #f))
(set! user-input (string-downcase (d-GetUserInput "Find Bookmark" "What are you after? Case insensitive" "X")))
(if user-input   ;in case the user pressed Escape do nothing
 (begin
  (let searchRehearsalMarkWithStringReturn((EndOfStaffSwitch #f))
  (if (d-MoveCursorRight)
	(if (and (string? (d-DirectiveGet-standalone-display "RehearsalMark" user-input)) (string-ci=? (d-DirectiveGet-standalone-display "RehearsalMark" user-input) user-input))
	 #t
	 (searchRehearsalMarkWithStringReturn EndOfStaffSwitch)
	)

  ;CursorRight #f:
   (if EndOfStaffSwitch
    #f
    (begin (d-MoveToBeginning)(searchRehearsalMarkWithStringReturn #t))
))))))
</scheme>
        <label>Search Bookmark</label>
        <tooltip>Searches for a named Bookmark in the current staff.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
