Skip to content

Commit

Permalink
Create gh-pages branch via GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
kugaevsky committed Nov 27, 2012
1 parent bfbec05 commit 2103695
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2>Rails gem for handling keyboard shortcuts via mousetrap javascript library</
<h1>Mousetrap::Rails <a href="http://coderwall.com/kugaevsky"><img src="http://api.coderwall.com/kugaevsky/endorsecount.png" alt="endorse"></a>
</h1>

<p><a href="http://travis-ci.org/kugaevsky/mousetrap-rails"><img src="https://secure.travis-ci.org/kugaevsky/mousetrap-rails.png" alt="Build Status"></a> <a href="https://gemnasium.com/kugaevsky/mousetrap-rails"><img src="https://gemnasium.com/kugaevsky/mousetrap-rails.png" alt="Dependency Status"></a> <a href="https://codeclimate.com/github/kugaevsky/mousetrap-rails"><img src="https://codeclimate.com/badge.png" alt="Code Climate"></a></p>
<p><a href="https://travis-ci.org/kugaevsky/mousetrap-rails"><img src="https://secure.travis-ci.org/kugaevsky/mousetrap-rails.png?branch=master" alt="Build Status"></a> <a href="https://gemnasium.com/kugaevsky/mousetrap-rails"><img src="https://gemnasium.com/kugaevsky/mousetrap-rails.png" alt="Dependency Status"></a> <a href="https://codeclimate.com/github/kugaevsky/mousetrap-rails"><img src="https://codeclimate.com/badge.png" alt="Code Climate"></a></p>

<p><a href="https://github.com/ccampbell/mousetrap">Mousetrap</a> is a javascript library for handling keyboard shortcuts in your web applications written by <a href="http://craig.is/">Craig Campbell</a>.</p>

Expand Down
2 changes: 1 addition & 1 deletion params.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"tagline":"Rails gem for handling keyboard shortcuts via mousetrap javascript library","note":"Don't delete this file! It's used internally to help with page regeneration.","name":"Mousetrap-rails","google":"UA-2540348-19","body":"# Mousetrap::Rails [![endorse](http://api.coderwall.com/kugaevsky/endorsecount.png)](http://coderwall.com/kugaevsky) \r\n\r\n[![Build Status](https://secure.travis-ci.org/kugaevsky/mousetrap-rails.png)](http://travis-ci.org/kugaevsky/mousetrap-rails) [![Dependency Status](https://gemnasium.com/kugaevsky/mousetrap-rails.png)](https://gemnasium.com/kugaevsky/mousetrap-rails) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/kugaevsky/mousetrap-rails)\r\n\r\n[Mousetrap](https://github.com/ccampbell/mousetrap) is a javascript library for handling keyboard shortcuts in your web applications written by [Craig Campbell](http://craig.is/).\r\n\r\nThe `mousetrap-rails` gem integrates Mousetrap javascript library with Rails Asset Pipeline.\r\n\r\n\r\n## Installation\r\n\r\n### Add mousetrap-rails gem to app\r\n\r\nAdd this line to your application's Gemfile:\r\n\r\n gem 'mousetrap-rails'\r\n\r\nAnd then execute:\r\n\r\n $ bundle install\r\n\r\n### Run generator\r\n\r\n $ rails generate mousetrap:install\r\n\r\nIt will create sample `keybindings.js.coffee` file in `app/assets/javascripts` and insert mousetrap-rails files to manifests of assert pipeline\r\n\r\n //= require mousetrap # ---> application.js\r\n *= require mousetrap # ---> application.css\r\n\r\nVoila!\r\n\r\n### Latest (may be unstable) version\r\n\r\nInstead of `gem 'mousetrap-rails'` add to your Gemfile\r\n\r\n gem 'mousetrap-rails', git: 'git://github.com/kugaevsky/mousetrap-rails.git'\r\n\r\n\r\n## Usage\r\n\r\n### Via data-attributes\r\n\r\nYou can add keyboard navigation to your links by using `data-keybinding` attribute.\r\n\r\n```haml\r\n= link_to 'Homepage', root_path, data: { keybinding: 'h' } # Press 'h' to navigate to homepage\r\n= link_to 'About', about_path, data: { keybinding: '[\"a\", \"c\"]' } # Press 'a' or 'c' to navigate to about\r\n```\r\n\r\nYou can jump to input\r\n\r\n```haml\r\n= text_field_tag 'Username', nil, data: { keybinding: 'u' } # Press 'u' to focus username input field\r\n```\r\n\r\n### Via javascript\r\n\r\nAny javascript function can be called with mousetrap\r\n\r\n```coffeescript\r\nMousetrap.bind 'f', (e) -> alert 'My perfect function called' # Press 'f' to popup alert\r\n```\r\n\r\n### More examples (from official guide)\r\n\r\n```coffeescript\r\n# single keys\r\nMousetrap.bind '4', -> alert '4 pressed!'\r\nMousetrap.bind 'x', (-> alert 'x pressed!'), 'keyup'\r\n\r\n# combinations\r\nMousetrap.bind 'command+shift+k', ->\r\n alert 'command+shift+k pressed!'\r\n false\r\n\r\nMousetrap.bind ['command+k', 'ctrl+k'], ->\r\n alert 'command+k or ctrl+k pressed!'\r\n false\r\n\r\n# gmail style sequences\r\nMousetrap.bind 'g i', -> console.log 'g i sequence pressed!'\r\nMousetrap.bind '* a', -> console.log '* a sequence pressed!'\r\n\r\n# konami code!\r\nMousetrap.bind 'up up down down left right left right b a enter', -> console.log 'You WIN!'\r\n```\r\n\r\nYou can find full documentation on [Mousetrap library page](http://craig.is/killing/mice). Really, look there – there are plenty examples of using this awesome library.\r\n\r\n### Key binding hints (experimental)\r\n\r\nYou can display key binding hints near links with `data-keybinding` attribute by pressing `Alt+Shift+h`. Now it's just experimental feature for debugging purposes only.\r\n\r\n\r\n## Changelog\r\n\r\nAll changes could be found in [CHANGELOG.md](https://github.com/kugaevsky/mousetrap-rails/blob/master/CHANGELOG.md)\r\n\r\n\r\n## License\r\n\r\nGosh! It's [here](https://github.com/kugaevsky/mousetrap-rails/blob/master/LICENSE.md).\r\n\r\n\r\n## Authors\r\n\r\n* mousetrap-rails gem by [Nick Kugaevsky](http://kugaevsky.ru)\r\n* original mousetrap library by [Craig Campbell](http://craig.is/)\r\n"}
{"tagline":"Rails gem for handling keyboard shortcuts via mousetrap javascript library","google":"UA-2540348-19","note":"Don't delete this file! It's used internally to help with page regeneration.","name":"Mousetrap-rails","body":"# Mousetrap::Rails [![endorse](http://api.coderwall.com/kugaevsky/endorsecount.png)](http://coderwall.com/kugaevsky) \r\n\r\n[![Build Status](https://secure.travis-ci.org/kugaevsky/mousetrap-rails.png?branch=master)](https://travis-ci.org/kugaevsky/mousetrap-rails) [![Dependency Status](https://gemnasium.com/kugaevsky/mousetrap-rails.png)](https://gemnasium.com/kugaevsky/mousetrap-rails) [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/kugaevsky/mousetrap-rails)\r\n\r\n[Mousetrap](https://github.com/ccampbell/mousetrap) is a javascript library for handling keyboard shortcuts in your web applications written by [Craig Campbell](http://craig.is/).\r\n\r\nThe `mousetrap-rails` gem integrates Mousetrap javascript library with Rails Asset Pipeline.\r\n\r\n\r\n## Installation\r\n\r\n### Add mousetrap-rails gem to app\r\n\r\nAdd this line to your application's Gemfile:\r\n\r\n gem 'mousetrap-rails'\r\n\r\nAnd then execute:\r\n\r\n $ bundle install\r\n\r\n### Run generator\r\n\r\n $ rails generate mousetrap:install\r\n\r\nIt will create sample `keybindings.js.coffee` file in `app/assets/javascripts` and insert mousetrap-rails files to manifests of assert pipeline\r\n\r\n //= require mousetrap # ---> application.js\r\n *= require mousetrap # ---> application.css\r\n\r\nVoila!\r\n\r\n### Latest (may be unstable) version\r\n\r\nInstead of `gem 'mousetrap-rails'` add to your Gemfile\r\n\r\n gem 'mousetrap-rails', git: 'git://github.com/kugaevsky/mousetrap-rails.git'\r\n\r\n\r\n## Usage\r\n\r\n### Via data-attributes\r\n\r\nYou can add keyboard navigation to your links by using `data-keybinding` attribute.\r\n\r\n```haml\r\n= link_to 'Homepage', root_path, data: { keybinding: 'h' } # Press 'h' to navigate to homepage\r\n= link_to 'About', about_path, data: { keybinding: '[\"a\", \"c\"]' } # Press 'a' or 'c' to navigate to about\r\n```\r\n\r\nYou can jump to input\r\n\r\n```haml\r\n= text_field_tag 'Username', nil, data: { keybinding: 'u' } # Press 'u' to focus username input field\r\n```\r\n\r\n### Via javascript\r\n\r\nAny javascript function can be called with mousetrap\r\n\r\n```coffeescript\r\nMousetrap.bind 'f', (e) -> alert 'My perfect function called' # Press 'f' to popup alert\r\n```\r\n\r\n### More examples (from official guide)\r\n\r\n```coffeescript\r\n# single keys\r\nMousetrap.bind '4', -> alert '4 pressed!'\r\nMousetrap.bind 'x', (-> alert 'x pressed!'), 'keyup'\r\n\r\n# combinations\r\nMousetrap.bind 'command+shift+k', ->\r\n alert 'command+shift+k pressed!'\r\n false\r\n\r\nMousetrap.bind ['command+k', 'ctrl+k'], ->\r\n alert 'command+k or ctrl+k pressed!'\r\n false\r\n\r\n# gmail style sequences\r\nMousetrap.bind 'g i', -> console.log 'g i sequence pressed!'\r\nMousetrap.bind '* a', -> console.log '* a sequence pressed!'\r\n\r\n# konami code!\r\nMousetrap.bind 'up up down down left right left right b a enter', -> console.log 'You WIN!'\r\n```\r\n\r\nYou can find full documentation on [Mousetrap library page](http://craig.is/killing/mice). Really, look there – there are plenty examples of using this awesome library.\r\n\r\n### Key binding hints (experimental)\r\n\r\nYou can display key binding hints near links with `data-keybinding` attribute by pressing `Alt+Shift+h`. Now it's just experimental feature for debugging purposes only.\r\n\r\n\r\n## Changelog\r\n\r\nAll changes could be found in [CHANGELOG.md](https://github.com/kugaevsky/mousetrap-rails/blob/master/CHANGELOG.md)\r\n\r\n\r\n## License\r\n\r\nGosh! It's [here](https://github.com/kugaevsky/mousetrap-rails/blob/master/LICENSE.md).\r\n\r\n\r\n## Authors\r\n\r\n* mousetrap-rails gem by [Nick Kugaevsky](http://kugaevsky.ru)\r\n* original mousetrap library by [Craig Campbell](http://craig.is/)\r\n"}

0 comments on commit 2103695

Please sign in to comment.