| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | /*********************************************************************/ | 
					
						
							| 
									
										
										
										
											2012-08-10 20:44:48 +04:00
										 |  |  | // NOTE: use String.fromCharCode(code)...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | var keybindings = { | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// togglable modes and options...
 | 
					
						
							| 
									
										
										
										
											2012-08-10 20:44:48 +04:00
										 |  |  | 	//191: 	toggleHelp,										//	?
 | 
					
						
							| 
									
										
										
										
											2012-08-14 23:40:26 +04:00
										 |  |  | 	70:		ImageGrid.toggleSingleImageMode,				//	f
 | 
					
						
							|  |  |  | 	83:		ImageGrid.toggleSingleRibbonMode,				//	s
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	13:		70,												//	Enter
 | 
					
						
							| 
									
										
										
										
											2012-08-15 04:03:11 +04:00
										 |  |  | 	84:		ImageGrid.toggleSingleImageModeTransitions,		//	t
 | 
					
						
							|  |  |  | 	65:		ImageGrid.toggleTransitions,					//	a
 | 
					
						
							|  |  |  | 	9:		ImageGrid.toggleControls,						//	tab
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	66:		toggleBackgroundModes,							//	b
 | 
					
						
							|  |  |  | 	77:		toggleMarkers,									//	m
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	// zooming...
 | 
					
						
							| 
									
										
										
										
											2012-08-15 03:02:27 +04:00
										 |  |  | 	187:	function(){scaleContainerBy(ImageGrid.option.ZOOM_FACTOR)},		//	+
 | 
					
						
							|  |  |  | 	189:	function(){scaleContainerBy(1/ImageGrid.option.ZOOM_FACTOR)},	//	-
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	// zoom presets...
 | 
					
						
							|  |  |  | 	48:	{ | 
					
						
							|  |  |  | 		'default':	fitImage,								// 	0
 | 
					
						
							|  |  |  | 		'ctrl':		function(){setContainerScale(1)},		//	ctrl+0
 | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 	51:		fitThreeImages,									//	3
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// navigation...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	36:		firstImage,										//	Home
 | 
					
						
							|  |  |  | 	35:		lastImage,										//	End
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	37:	{ | 
					
						
							|  |  |  | 		'default': prevImage,								//	Right
 | 
					
						
							|  |  |  | 		'ctrl': prevScreenImages,							//	ctrl-Right
 | 
					
						
							|  |  |  | 		'alt': prevScreenImages,							//	alt-Right
 | 
					
						
							|  |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	80: 	37, 											// 	BkSp
 | 
					
						
							|  |  |  | 	188:	37, 											//	p
 | 
					
						
							|  |  |  | 	8:		37,												//	<
 | 
					
						
							| 
									
										
										
										
											2012-08-10 19:40:26 +04:00
										 |  |  | 	39:	{ | 
					
						
							|  |  |  | 		'default': nextImage,								//	Left
 | 
					
						
							|  |  |  | 		'ctrl': nextScreenImages,							//	ctrl-Left
 | 
					
						
							|  |  |  | 		'alt': nextScreenImages,							//	alt-Left
 | 
					
						
							|  |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	32:		39,												//	Space
 | 
					
						
							|  |  |  | 	190:	39,												//	m
 | 
					
						
							|  |  |  | 	78: 	39,												//	>
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// move view...
 | 
					
						
							|  |  |  | 	// XXX should these be s-up, s-down, ... ??
 | 
					
						
							|  |  |  | 	75:		moveViewUp,										//	k
 | 
					
						
							|  |  |  | 	74:		moveViewDown,									//	j
 | 
					
						
							|  |  |  | 	72:		moveViewLeft,									//	h
 | 
					
						
							|  |  |  | 	76:		moveViewRight,									//	l
 | 
					
						
							|  |  |  | 	79:		centerCurrentImage,								//	o
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// combined navigation with actions..
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	40:	{ | 
					
						
							|  |  |  | 		'default': focusBelowRibbon,						//	Down
 | 
					
						
							|  |  |  | 		'shift': shiftImageDown,							//	shift-Down
 | 
					
						
							|  |  |  | 		'ctrl+shift': function(){							//	ctrl-shift-Down
 | 
					
						
							|  |  |  | 			createRibbon('next') | 
					
						
							|  |  |  | 			shiftImageDown() | 
					
						
							|  |  |  | 		} | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	}, | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	38: { | 
					
						
							|  |  |  | 		'default': focusAboveRibbon,						//	Up
 | 
					
						
							|  |  |  | 		'shift': shiftImageUp,								//	shift-Up
 | 
					
						
							|  |  |  | 		'ctrl+shift': function(){							//	ctrl-shift-Up
 | 
					
						
							|  |  |  | 			createRibbon('prev') | 
					
						
							|  |  |  | 			shiftImageUp() | 
					
						
							|  |  |  | 		} | 
					
						
							|  |  |  | 	}, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-14 22:28:33 +04:00
										 |  |  | 	// ignore the modifiers (shift, alt, ctrl, caps)...
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 	16:		function(){}, | 
					
						
							|  |  |  | 	17:		16, | 
					
						
							|  |  |  | 	18:		16, | 
					
						
							| 
									
										
										
										
											2012-08-10 20:44:48 +04:00
										 |  |  | 	20:		16,												// Caps Lock
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-08-10 18:31:32 +04:00
										 |  |  | /*********************************************************************/ | 
					
						
							| 
									
										
										
										
											2012-08-08 23:19:40 +04:00
										 |  |  | // vim:set ts=4 sw=4 nowrap :
 |