v1.2.6Published 8 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.


Keybindings dialogs for the ClinicalFramework apps.



meteor add clinical:keybindings



1{{> keybindingsModal }}

======================================== ####Javascript Key Codes

======================================== ####ASCII & Unicode Character Tables

======================================== ####Submitting Data in Forms

Here's a common pattern for submitting data to your app, instead of binding to the submit event. Basically, we're binding to the keyup event instead, looking for keycode 13, and if we detect it, setting a reactive Session variable. This is a preferred Meteor-centric approach to submitting data in forms because it uses minimongo, and gets all the benefits of client-side caching and cursors, such as latency compensation and reactive template updates.{
2  'keyup #urlAddressBar': function(event,template){
3     // keyCode 13 is the 'Enter' key 
4     if(event.keyCode == 13) {
5       // decide whether you want to prevent default behavior or not
6       event.preventDefault()
8       // set client side session variable
9       Session.set('browser_window_location', $('#urlAddressBar').val());
11       // or set something in the database
12       Meteor.users().update({_id: Meteor.userId()}, {$set: { 'profile.selectedUrl': $('#urlAddressBar').val() }})
14       // and finally, maybe force the UI to redraw if necessary
15       Meteor.flush();
16     }
17  }



MIT License