<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <after>DeleteStaffGroupings</after>
        <action>PianoStaffName</action>
        <scheme>;;;PianoStaffName
(let ((tag "ContextPianoStaff") (name "Piano"))
	(if (d-DirectiveGet-staff-prefix tag)
		(begin
		    (set! name (d-GetUserInput (_ "Instrument Name") (_ "Give name of instrument for staff group starting here:") name))
		    (if name
			(set! name (string-append "\\set PianoStaff.instrumentName = #\"" name "\" "))
			(set! name ""))
		    (AttachDirective "staff"  "prefix"  "ContextPianoStaff" (string-append " \\new PianoStaff &lt;&lt; " name " \n") DENEMO_OVERRIDE_GRAPHIC DENEMO_OVERRIDE_AFFIX))
		  (begin
		  	(d-WarningDialog "This command must be issued on the first staff of a piano staff group"))))
</scheme>
        <label>Piano Staff Name</label>
        <tooltip>Prints the name given at the start of the Piano staff which must be where the cursor is. Remove instrument names on the individual staffs by setting them blank.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
