Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update itext_key_behavior.mixin.js #1616

Merged
merged 4 commits into from
Sep 3, 2014
Merged

Update itext_key_behavior.mixin.js #1616

merged 4 commits into from
Sep 3, 2014

Conversation

asturur
Copy link
Member

@asturur asturur commented Aug 25, 2014

Added behaviour for keys pagUP ,pagDOWN , HOME, END, TAB and ESC. ( mimic meta key, that on windows i don't know where it is )
Removed rendering of squares in firefox.

@asturur
Copy link
Member Author

asturur commented Aug 25, 2014

@kangax
For Tab and Esc i assigned "end of edit" functionality.
That because pressing TAB would move you out of focus from the canvas, you would render a square, you would press BACKSPACE by instinct , and you would go to previous internet page and increase your rage bar by 10 points.
So TAB and ESC now just stop editing.
Home is like CMD + LEFT, working good even with SHIFT+ HOME.
End is like CMD + RIGHT, working with shift
pgUp is CMD + UP , working with shift,
pgDown is CMD + DOWN, working with shift.
I was thinking about a "InsertMode" on / off for the Ins Key, but i don't know if people nowadays use insert key anymore.

Better behaviour of selection with keyboard.
Now you can cross from select direction LEFT to RIGHT and back.
@asturur
Copy link
Member Author

asturur commented Aug 25, 2014

Improved text selection with keyboard, you can cross selection start with up and down now.
@sorich87 please, check if even for you is ok.

Sorry, i missed that.
33: 'moveCursorUp',
34: 'moveCursorDown',
35: 'moveCursorRight',
36: 'moveCursorLeft',
37: 'moveCursorLeft',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are both 36 and 37 moveCursorLeft?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two moveCursorLeft, two moveCursorRight, two moveCursorUp, two moveCursorDown.
You defined functions for moving the cursor for the arrow keys, and then with the help of CMD button ( metakey ) you use the same functions to go to: start of text, end of text, start of line, end of line.
I bind home, end, pgUp and pgDown keys to those functions ( not having a cmd button on my laptop ) and i obtain the same functions.

@kangax
Copy link
Member

kangax commented Aug 25, 2014

Hey @sorich87, could you please test this? Would really appreciate it.

@asturur
Copy link
Member Author

asturur commented Aug 31, 2014

did someone give it a quick look?

other than new functions it stops that square rendering in firefox.
Il 25/ago/2014 19:14 "Juriy Zaytsev" [email protected] ha scritto:

Hey @sorich87 https://github.com/sorich87, could you please test this?
Would really appreciate it.


Reply to this email directly or view it on GitHub
#1616 (comment).

@sorich87
Copy link
Contributor

I tested on a US keyboard and it works fine. I wanted to test on a FR keyboard too before replying but haven't had a chance yet.

@asturur
Copy link
Member Author

asturur commented Aug 31, 2014

Beside working correctly, do you like the behaving of selection when crossing selectionstart and / or the new keys functionality?

For locales i wouldnt bother, tab esc pgup down, end home have the same keycodes since forever.

2 similar comments
@asturur
Copy link
Member Author

asturur commented Aug 31, 2014

Beside working correctly, do you like the behaving of selection when crossing selectionstart and / or the new keys functionality?

For locales i wouldnt bother, tab esc pgup down, end home have the same keycodes since forever.

@asturur
Copy link
Member Author

asturur commented Aug 31, 2014

Beside working correctly, do you like the behaving of selection when crossing selectionstart and / or the new keys functionality?

For locales i wouldnt bother, tab esc pgup down, end home have the same keycodes since forever.

@sorich87
Copy link
Contributor

Yes, it's great! I couldn't test home and end though (Mac OS X).

@logical-and
Copy link

Please create new tag with this fix. Cannot use fixed version with bower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants