开发者

What is the difference between moveBackward: and moveLeft: when using NSResponder -interpretKeyEvents:?

开发者 https://www.devze.com 2023-01-04 05:51 出处:网络
I\'m implementing a custom text box using -interpretKeyEvents: and am trying to figure out what the difference is between moveBackward: vs moveLeft: and moveForward: vs moveRight:. moveLeft: is bound

I'm implementing a custom text box using -interpretKeyEvents: and am trying to figure out what the difference is between moveBackward: vs moveLeft: and moveForward: vs moveRight:. moveLeft: is bound to the left arrow and mov开发者_运维技巧eBackward: is bound to Ctrl + B. The documentation describes them almost identically and they seem to behave identically in practice.

I'm assuming this is just a holdover from Vim? Does anyone know what the real difference is? Should moveBackward: just call my moveLeft: implementation?

Thanks a lot,

Nick


Comparing the documentation, moveBackward says it moves to the beginning of the selection, and moveLeft says it moves to the left end. So we ask ourselves, is the left end always the beginning? Not in right to left text (as in Hebrew or Arabic).

0

精彩评论

暂无评论...
验证码 换一张
取 消