Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # adding "shift" support to http://www.patrick-wied.at/projects/heatmap-keyboard/
- # crude first cut: left shift only, shifted *letters* only
- diff --git a/coordinates.js b/coordinates.js
- index a5dfb1a..f6c5437 100644
- --- a/coordinates.js
- +++ b/coordinates.js
- @@ -67,7 +67,8 @@ app.COORDINATES = {
- ">": [590, 275],
- "/": [644, 275],
- "?": [644, 275],
- - " ": [500, 300]
- + " ": [500, 300],
- + "LSHIFT": [104 ,275],
- },
- app.EXCLUDES = [" "],
- app.SAMPLE_TEXT = [
- diff --git a/index.html b/index.html
- index 7f77f8e..125f6ef 100644
- --- a/index.html
- +++ b/index.html
- @@ -131,6 +131,13 @@
- var key = text.charAt(i);
- if(/^[A-Za-z]$/.test(key)){
- + if (/[A-Z]/.test(key)) {
- + var joined = app.COORDINATES["LSHIFT"].join(";");
- + if(!temp[joined])
- + temp[joined] = 0;
- +
- + temp[joined] += 1;
- + }
- key = key.toUpperCase();
- }
- if(app.config.exclude && app.EXCLUDES.indexOf(key) == -1){
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement