##// END OF EJS Templates
Backport PR #5488: Added missing require and jquery from cdn....
Backport PR #5488: Added missing require and jquery from cdn. For some reason (I suppose some changes at the css level) the font size inside the input cells was fixed at 14 px... making the fonts really small in the reveal slideshows. This is really annoying... As a plus, I have also added the missing calls for require and jquery (as the full html template does). I think these fixes belong to 2.0, but I also know we are on the edge... so I hope to get it inside :wink: Cheers.

File last commit:

r15873:8be8acce
r16230:ba262623
Show More
keyboard.js
49 lines | 1.6 KiB | application/javascript | JavascriptLexer
var normalized_shortcuts = [
'ctrl-shift-m',
'alt-meta-p',
];
var to_normalize = [
['shift-%', 'shift-5'],
['ShiFT-MeTa-CtRl-AlT-m', 'alt-ctrl-meta-shift-m'],
];
var unshifted = "` 1 2 3 4 5 6 7 8 9 0 - = q w e r t y u i o p [ ] \\ a s d f g h j k l ; ' z x c v b n m , . /";
// shifted = '~ ! @ # $ % ^ & * ( ) _ + Q W E R T Y U I O P { } | A S D F G H J K L : " Z X C V B N M < > ?';
casper.notebook_test(function () {
this.then(function () {
this.each(unshifted.split(' '), function (self, item) {
var result = this.evaluate(function (sc) {
var e = IPython.keyboard.shortcut_to_event(sc);
var sc2 = IPython.keyboard.event_to_shortcut(e);
return sc2;
}, item);
this.test.assertEquals(result, item, 'Shortcut to event roundtrip: '+item);
});
});
this.then(function () {
this.each(to_normalize, function (self, item) {
var result = this.evaluate(function (pair) {
return IPython.keyboard.normalize_shortcut(pair[0]);
}, item);
this.test.assertEquals(result, item[1], 'Normalize shortcut: '+item[0]);
});
});
this.then(function () {
this.each(normalized_shortcuts, function (self, item) {
var result = this.evaluate(function (sc) {
var e = IPython.keyboard.shortcut_to_event(sc);
var sc2 = IPython.keyboard.event_to_shortcut(e);
return sc2;
}, item);
this.test.assertEquals(result, item, 'Shortcut to event roundtrip: '+item);
});
});
});