Mac OS X의 키 설정을 윈도우 같이 하기

Windows만 사용하시다 Mac OS X로 넘어오시면.. 가장 처음 적응 안되는 것 중 하나가 단축키 입니다.
이러한 단축키를 Windows 같이 "비슷하게" 변경할 수 있는데요.. 다음과 같이 설정 해 주시면 됩니다.

* 일반 응용 프로그램에서 키보드 배치 변경하기
1. DefaultKeyBinding.dict 파일 편집 (없으면 생성)
$ vi ~/Library/KeyBindings/DefaultKeyBinding.dict


2. 다음과 같이 입력
{
    /* home */
    "\UF729" = "moveToBeginningOfLine:";
    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";

    /* end */
    "\UF72B" = "moveToEndOfLine:";
    "$\UF72B" = "moveToEndOfLineAndModifySelection:";

    /* page up/down */
    "\UF72C" = "pageUp:";
    "\UF72D" = "pageDown:";
}


* 터미널(terminal) 응용 프로그램에서 키보드 배치 변경하기
1. 터미널 실행
2. 환경설정-설정-키보드로 이동
3. home, end, page up, page down을 다음과 같은 값으로 변경
home: \033[1~
end: \033[4~
page up: \033[5~
page down: \033[6~
shift page down: "버퍼에서 다음 페이지로 스크롤"
shift page up: "버퍼에서 이전 페이지로 스크롤"
- 참고
  - \033은 "esc"키를 누르면 나옵니다
  - 기존에 "작업" 부분이 "버퍼에서~"로 되어 있는 항목은 "문자열을 셀로 보내기:"로 변경한 뒤 키를 입력하셔야 합니다.

이렇게 수동으로 설정해 주시거나 다음 파일을 받으신 뒤 실행합니다.

terminal 설정 파일 다운로드



참고:
http://theeye.pe.kr/entry/how-to-mapping-keyboard-home-end-pgup-pgdown
http://fplanque.com/dev/mac/mac-osx-terminal-page-up-down-home-end-of-line

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/09/02 16:14 2009/09/02 16:14
, ,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/245

저 같은 경우에는 Mac과 Windows 두 개를 동시에 사용 중인데, samba로 Mac의 디렉토리를 공유한 뒤 Windows에서 네트워크 드라이브로 연결해서 사용합니다. 이 때 Mac에서 화면을 캡쳐(shift+command+숫자를 이용하여)하고 Windows에서 사용하려면 (ppt에 사용한다던가) ~/Desktop에 있는 파일들을 공유 디렉토리로 일일히 복사해야되는 불편함이 있는데요, 다음과 같은 명령어를 이용하여 이 경로를 변경할 수 있습니다.

defaults write com.apple.screencapture location <디폴트로_저장_할_경로>

정상적으로 되었다면

killall SystemUIServer

를 실행하여 ui server를 초기화 합니다.

정상적으로 실행한 뒤 화면 캡쳐를 해 보면 해당 디렉토리에 이미지 파일이 생성되는 것을 보실 수 있습니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/08/10 10:08 2009/08/10 10:08
,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/238

MacOSX 안전모드로 실행하기

Mac OS X: Starting up in Safe Mode

  • Last Modified: February 05, 2009
  • Article: HT1455
  • Old Article: 107393

Summary

Learn how to start up in Safe Mode.

Products Affected

Mac OS X 10.4, Mac OS X 10.3, Mac OS X 10.2, Mac OS X 10.5

To start up into Safe Mode (to Safe Boot), do this:

  1. Be sure the computer is shut down.
  2. Press the power button.
  3. Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone but not before.
  4. Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).

During startup in Mac OS X 10.4 or later, you will see "Safe Boot" on the login window, which appears even if you normally log in automatically.

During startup in Mac OS X 10.2 through 10.3.9, you will see "Safe Boot" on the Mac OS X startup screen.

To leave Safe Mode in any version of Mac OS X, restart the computer normally, without holding any keys during startup.

Additional Information

Advanced: If you can't Safe Boot with a keyboard

If for some reason you can't use the keyboard method to start in Safe Mode (the keyboard is missing or not working, for example), and you already have remote access to the computer, you can configure the computer to startup in Safe Mode via its command line

  1. Access the command line by either opening Terminal remotely, or by logging into the computer from another via SSH.
  2. Execute the following command in Terminal or on the command line:

    sudo nvram boot-args="-x"

    (If you want to start in Verbose mode as well, use sudo nvram boot-args="-x -v" instead )
     
  1. After using Safe Boot, to return to a normal startup, execute this command in Terminal or the command line:

    sudo nvram boot-args=""


See also:


http://support.apple.com/kb/HT1455?viewlocale=en_US
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/04/14 17:30 2009/04/14 17:30
,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/217

Xcode Key Binding 정보 백업하기 (Xcode 3.1.3)

Xcode에서 힘들게 세팅해놓은 key binding정보를 백업하는 방법은 다음과 같습니다:

/Users/<사용자 이름>/Library/Application Support/Xcode/Key Bindings


로 이동 후, 원하시는 pbxkeys 파일을 백업하시면 됩니다.
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/03/31 14:52 2009/03/31 14:52
,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/212

Mac OS X 키 설정하기

I recently wanted to change some key bindings on Mac OS X. After spending a lot of time searching I found the information that I needed. However, the information was spread across several different sites. This article aims to collect all of the information that I found in a single document.

Mac OS X allows for some powerful control over key bindings. The method I describe below allows you to modify the key binding behavior for every program that uses the standard Cocoa AppKit text edit objects.

The default key bindings are stored in:

/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict

Unfortunately, this file is XML and is very painful to read. You shouldn’t touch this file anyway, and you should make your modifications by creating the file:

/Users/USERNAME/Library/KeyBindings/DefaultKeyBinding.dict

where USERNAME is the name of your user account. If the KeyBindings directory doesn’t exist then you should create it. Note that the file name differs between the system default (StandardKeyBinding.dict) and the user override (DefaultKeyBinding.dict).

The non-XML file format is basically key / action pairs:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
    "KEY1" = "ACTION1";  /* Bind KEY1 to ACTION1 */
    "KEY2" = "ACTION2";  /* Bind KEY2 to ACTION2 */
    ...
}

An example is shown below:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
    "^f"      = "moveWordForward:";            /* Ctrl-f    = next word     */
    "^b"      = "moveWordBackward:";           /* Ctrl-b    = previous word */
    "^v"      = "pageUp:";                     /* Ctrl-v    = page up       */
    "\UF729"  = "moveToBeginningOfLine:";      /* Home      = start of line */
    "^\UF729" = "moveToBeginningOfDocument:";  /* Ctrl-Home = start of doc  */
}

A key is defined either as a printable key character (e.g., “a”), or a non-printable key character in either octal (e.g, “\177″ for delete) or Unicode (e.g., “\UF700″ for up arrow) encoding. The key can be preceded by one or more key ‘modifiers’:

Key Modifiers

  ^ : Ctrl
  $ : Shift
  ~ : Option (Alt)
  @ : Command (Apple)
  # : Numeric Keypad

For example, Control-Shift-Home would be “^$\UF729″, and Command-a would be “@a”. I’ve had some issues with the ordering of these key modifiers on OS X 10.5 Leopard. For example, “$^\UF703″ (Ctrl-Shift Right Arrow) doesn’t work, but “^$\UF703″ does. If you are combining multiple modifiers and it doesn’t work, try reordering them.

A list of the most common non-printable key codes is shown below. A complete list can be found in the NSEvent.h header file.

Non-Printable Key Codes

  Up Arrow:     \UF700        Backspace:    \U0008        F1:           \UF704
  Down Arrow:   \UF701        Tab:          \U0009        F2:           \UF705
  Left Arrow:   \UF702        Escape:       \U001B        F3:           \UF706
  Right Arrow:  \UF703        Enter:        \U000A        ...
  Insert:       \UF727        Page Up:      \UF72C
  Delete:       \UF728        Page Down:    \UF72D
  Home:         \UF729        Print Screen: \UF72E
  End:          \UF72B        Scroll Lock:  \UF72F
  Break:        \UF732        Pause:        \UF730
  SysReq:       \UF731        Menu:         \UF735
  Help:         \UF746

An action is simply a specific string denoting the action. A list of the most common supported actions is shown below. Note the colon at the end of each action. This is required.

Supported Actions

  alignCenter:                                        newDocument:
  alignJustified:                                     openDocument:
  alignLeft:                                          orderBack:
  alignRight:                                         orderFront:
  breakUndoCoalescing                                 orderFrontLinkPanel:
  cancelOperation:                                    orderFrontListPanel:
  capitalizeWord:                                     orderFrontSpacingPanel:
  center                                              orderFrontTablePanel:
  centerSelectionInVisibleArea:                       outline:
  changeCaseOfLetter:                                 pageDown:
  checkSpelling:                                      pageUp:
  clearRecentDocuments:                               paste:
  complete:                                           pasteAsPlainText:
  copy:                                               pasteAsRichText:
  copyFont:                                           pasteFont:
  copyRuler:                                          pasteRuler:
  cut:                                                performClose:
  delete:                                             performMiniaturize:
  deleteBackward:                                     performZoom:
  deleteBackwardByDecomposingPreviousCharacter:       printDocument:
  deleteForward:                                      raiseBaseline:
  deleteToBeginningOfLine:                            revertDocumentToSaved:
  deleteToBeginningOfParagraph:                       runPageLayout:
  deleteToEndOfLine:                                  saveAllDocuments:
  deleteToEndOfParagraph:                             saveDocument:
  deleteToMark:                                       saveDocumentAs:
  deleteWordBackward:                                 saveDocumentTo:
  deleteWordForward:                                  scrollLineDown:
  hide:                                               scrollLineUp:
  ignoreSpelling:                                     scrollPageDown:
  indent:                                             scrollPageUp:
  insertBacktab:                                      selectAll:
  insertContainerBreak:                               selectLine:
  insertLineBreak:                                    selectParagraph:
  insertNewline:                                      selectToMark:
  insertNewlineIgnoringFieldEditor:                   selectWord:
  insertParagraphSeparator:                           setMark:
  insertTab:                                          showContextHelp:
  insertTabIgnoringFieldEditor:                       showGuessPanel:
  insertText:                                         startSpeaking:
  loosenKerning:                                      stopSpeaking:
  lowerBaseline:                                      subscript:
  lowercaseWord:                                      superscript:
  moveBackward:                                       swapWithMark:
  moveBackwardAndModifySelection:                     terminate:
  moveDown:                                           tightenKerning:
  moveDownAndModifySelection:                         toggleBaseWritingDirection:
  moveForward:                                        toggleContinuousSpellChecking:
  moveForwardAndModifySelection:                      toggleRuler:
  moveLeft:                                           transpose:
  moveLeftAndModifySelection:                         transposeWords:
  moveRight:                                          turnOffKerning:
  moveRightAndModifySelection:                        turnOffLigatures:
  moveToBeginningOfDocument:                          underline:
  moveToBeginningOfDocumentAndModifySelection:        unscript:
  moveToBeginningOfLine:                              uppercaseWord:
  moveToBeginningOfLineAndModifySelection:            useAllLigatures:
  moveToBeginningOfParagraph:                         useStandardKerning:
  moveToEndOfDocument:                                useStandardLigatures:
  moveToEndOfDocumentAndModifySelection:              yank:
  moveToEndOfLineAndModifySelection:
  moveToEndOfLine:
  moveToEndOfParagraph:
  moveUp:
  moveUpAndModifySelection:
  moveWordBackward:
  moveWordBackwardAndModifySelection:
  moveWordForward:
  moveWordForwardAndModifySelection:
  moveWordLeft:
  moveWordLeftAndModifySelection:
  moveWordRight:
  moveWordRightAndModifySelection:

There are two other variants of entries that allow you to do multi-key bindings and to bind a key to a sequence of actions.

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
    /* Bind KEY1 to ACTION1 and ACTION2      */
    "KEY1" = ("ACTION1", "ACTION2", ...);

    /* Multi-key bindings                    */
    "KEY1" = {
             /* Bind KEY1 followed by KEY2 to ACTION1 */
             "KEY2" = "ACTION1";
             /* Bind KEY1 followed by KEY3 to ACTION2 */
             "KEY3" = "ACTION2";
             ...
             };
    ...
}

An example is shown below:

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
    /* An example of binding a sequence of actions to a single key.
       Bind Control-Shift-Home to select the region from the cursor to the
       beginning of the line.  Windows-style Control-Shift-Home. */

    "$\UF729"  = ("setMark:","moveToBeginningOfLine:","selectToMark:");

    /* An example of binding a sequence of keys to an action.
       Bind Control-x Control-s to save.  Emacs style C-x C-s. */

    "^x" = { "^s"  = "save:"; }
}

Examples

An example key binding file for partial Windows emulation.

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
    "^\010"    = "deleteWordBackward:";
    "\UF729"   = "moveToBeginningOfLine:";
    "^\UF729"  = "moveToBeginningOfDocument:";
    "$\UF729"  = "moveToBeginningOfLineAndModifySelection:";
    "^$\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
    "\UF72B"   = "moveToEndOfLine:";
    "^\UF72B"  = "moveToEndOfDocument:";
    "$\UF72B"  = "moveToEndOfLineAndModifySelection:";
    "^$\UF72B" = "moveToEndOfDocumentAndModifySelection:";
    "^\UF702"  = "moveWordLeft:";
    "^\UF703"  = "moveWordRight:";
    "\UF72C"   = "pageUp:";
    "\UF72D"   = "pageDown:";
    "^z"       = "undo:";
    "$\UF728"  = "cut:";
    "$\UF746"  = "paste:";
    "^\UF746"  = "copy:";
    "$\UF700"  = "moveUpAndModifySelection:";
    "$\UF701"  = "moveDownAndModifySelection:";
    "$\UF702"  = "moveLeftAndModifySelection:";
    "$\UF703"  = "moveRightAndModifySelection:";
    "^$\UF702" = "moveWordLeftAndModifySelection:";
    "^$\UF703" = "moveWordRightAndModifySelection:";
}

An example key binding file for partial Emacs emulation.

/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
/* The original bindings are from Mike Ferris of lorax.com as shipped
 * with his TextExtras package.  They were further modified by Mishka Gorodnitzky
 * (misaka@pobox.com), Patrick Linskey, and Llew Mason.
 */
{
    "~f"      = "moveWordForward:";              /* M-f */
    "~b"      = "moveWordBackward:";             /* M-b */
    "~<"      = "moveToBeginningOfDocument:";    /* M-< */
    "~>"      = "moveToEndOfDocument:";          /* M-> */
    "~v"      = "pageUp:";                       /* M-v */
    "^v"      = "pageDown:";                     /* C-v */
    "~d"      = "deleteWordForward:";            /* M-d */
    "~^h"     = "deleteWordBackward:";           /* M-C-h */
    "~\010"   = "deleteWordBackward:";           /* M-backspace */
    "~\177"   = "deleteWordBackward:";           /* M-delete */
    "~\UF728" = "deleteWordForward:";            /* delete */
    "\UF729"  = "moveToBeginningOfDocument:";    /* home */
    "\UF72B"  = "moveToEndOfDocument:";          /* end */
    "@\UF729" = "moveToBeginningOfParagraph:";   /* A-home */
    "@\UF72B" = "moveToEndOfParagraph:";         /* A-end */
    "@\UF700" = "moveToBeginningOfDocument:";    /* A-up */
    "@\UF701" = "moveToEndOfDocument:";          /* A-down */
    "^\UF700" = "pageUp:";                       /* C-up */
    "^\UF701" = "pageDown:";                     /* C-down */
    "\UF72C"  = "pageUp:";                       /* page-up */
    "\UF72D"  = "pageDown:";                     /* page-down */
    "^/"      = "undo:";                         /* C-/ */
    "~c"      = "capitalizeWord:";               /* M-c */
    "~u"      = "uppercaseWord:";                /* M-u */
    "~l"      = "lowercaseWord:";                /* M-l */
    "^t"      = "transpose:";                    /* C-t */
    "~t"      = "transposeWords:";               /* M-t */
    "~/"      = "complete:";                     /* M-/ */
    "^g"      = "_cancelKey:";                   /* C-g */
    "^a"      = "moveToBeginningOfLine:";        /* C-a */
    "^e"      = "moveToEndOfLine:";              /* C-e */   

    "^x" = {
        "^x"  = "swapWithMark:";                 /* C-x C-x */
        "^m"  = "selectToMark:";                 /* C-x C-m */
        "^s"  = "save:";                         /* C-x C-s */
        "^w"  = "saveAs:";                       /* C-x C-w */
        "k"   = "performClose:";                 /* C-x C-k */
    };

    /* Mark-point stuff (Emacs-style mark and point bindings are
     * implemented but not bound by default.  In the text system the
     * mark and point are ranges, not just locations.  The "point" is
     * the selected range.)
     */
    "^@" = "setMark:";                           /* C-@ */
    "^ " = "setMark:";                           /* C-space */
    "^w" = "deleteToMark:";                      /* C-w */

    /* Mac Style F1-F5 bindings */
    "\UF704" = "undo:";                          /* F1 */
    "\UF705" = "cut:";                           /* F2 */
    "\UF706" = "copy:";                          /* F3 */
    "\UF707" = "paste:";                         /* F4 */
    "\UF708" = "_cancelKey:";                    /* F5 */
}

출처: http://www.erasetotheleft.com/post/mac-os-x-key-bindings/
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/03/31 14:47 2009/03/31 14:47
,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/211

Mac OS X의 센스 ㅋㅋ

Mac 에서 주변에 공유된 네트워크 PC들 볼 때 운영체제에 따라 아이콘이 다르게 나옵니다. 아래와 같이 말이죠.

사용자 삽입 이미지
<Mac일 경우>

사용자 삽입 이미지
<Windows PC일 경우>

그런데, WIndows PC일 경우 나오는 화면이 Windows 98 시절의 BSOD 라는 생각이 드는것은 저 뿐일까요?..ㅋㅋㅋ
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 장현준

2009/03/25 18:13 2009/03/25 18:13
, ,
Response
No Trackback , No Comment
RSS :
http://b4you.net/blog/rss/response/206


블로그 이미지

빗소리를 먹는 사람.

- 장현준

Notices

Archives

Authors

  1. 장현준

Recent Trackbacks

Calendar

«   2017/09   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Site Stats

Total hits:
1714553
Today:
3708
Yesterday:
3980