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

Mapped Vi-mode's Escape with Ctrl+'[' #448

Merged
merged 1 commit into from Dec 6, 2018

Conversation

Projects
None yet
2 participants
@adover134
Contributor

adover134 commented Nov 24, 2018

Vi모드에서 ESC키 대신 Cntl키와 '['키를 같이 누르는 것으로 영문으로 전환시킬 수 있도록 하였습니다.

@@ -261,7 +261,11 @@ let GureumInputSourceToHangulKeyboardIdentifierTable: [GureumInputSourceIdentifi
if self.delegate === hangulComposer {
// Vi-mode: esc로 로마자 키보드로 전환
if GureumConfiguration.shared.romanModeByEscapeKey && keyCode == kVK_Escape {
//Bool b;
let ControlUnpressed = inputModifier.intersection(NSEvent.ModifierFlags.control).isEmpty;

This comment has been minimized.

@youknowone

youknowone Nov 24, 2018

Member

swift에서는 변수 이름을 소문자로 시작하는 camelCase를 씁니다. controlUnpressed
그런데 control이 눌렸는지 테스트하는게 중요하지 눌리지 않은것은 관심사항이 아닙니다.

따라서 controlPressed로 사람에게 친숙한 논리를 저장하게 바꾸어 주세요

@@ -261,7 +261,11 @@ let GureumInputSourceToHangulKeyboardIdentifierTable: [GureumInputSourceIdentifi
if self.delegate === hangulComposer {
// Vi-mode: esc로 로마자 키보드로 전환
if GureumConfiguration.shared.romanModeByEscapeKey && keyCode == kVK_Escape {
//Bool b;

This comment has been minimized.

@youknowone

youknowone Nov 24, 2018

Member

안 쓰는 줄은 지워주세요

@adover134 adover134 force-pushed the adover134:fix-vi-mode branch from 5b2fa2a to 9d0f717 Nov 24, 2018

@youknowone youknowone force-pushed the adover134:fix-vi-mode branch from 9d0f717 to 62cea10 Dec 6, 2018

@youknowone youknowone merged commit 3e99202 into gureum:master Dec 6, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment