<Application autoNameMapping="true">
	<Window caption="Date Picker Test" width="400" height="250">

		<DatePicker id="dp" left="5" top="5" />

	</Window>
	<Resources>
		<!--
			Override the default key bundle. The selection.down shortcut is
			different from default. The next/prev month shortcuts have been
			removed ("selection.page.previous" and "selection.page.next")
			shortcuts.
		 -->
		<KeyBundle><![CDATA[
{
	"keystrokes": {
		// Keystrokes used by BiDatePicker. Other shortcuts have been removed for brevity.
		"popup.close":		"esc",
		"popup.toggle":		["alt+up", "alt+down", "F4"], // This is overridden in the other bundle

		"controls.accept":	"enter",
		"controls.cancel":	"esc",

		"focus.next":		"tab",
		"focus.previous":	"shift+tab",

		"selection.first":	"home",
		"selection.last":	"end",

		"selection.up":		"up",
		"selection.down":	"ctrl+down",
		"selection.left":	"left",
		"selection.right":	"right"
	}
}
		]]></KeyBundle>
		<!-- Merge: Override popup.toggle only -->
		<KeyBundle merge="true"><![CDATA[
{
	// implictly added to keystrokes.
	"popup.toggle": "ctrl+up"
}
		]]></KeyBundle>
		<!-- Merge: Only adds custom.key (from .json file) -->
		<KeyBundle merge="true" src="KeyBundleTest_overrides.json"/>
		<Script><![CDATA[

KeyBundleTest = {
	main: function () {
		application.getWindow().addEventListener("keydown", this._checkBundle);
	},
	_checkBundle: function (e) {
		if (e.matchesBundleShortcut("custom.key"))
			alert("Custom shortcut pressed");
	}
};
		]]></Script>
	</Resources>
</Application>
