B / Y / U / S
HOME À¥ È£½ºÆà µµ¸ÞÀÎ ¸Å´º¾ó °í°´Áö¿ø ¼³Á¤Á¤º¸ °èÁ¤½Åû 2024-12-24 Tuesday 
À¥ È£½ºÆÃ
# °øÁö »çÇ×
# ÀÚÁÖ ¹¯´Â Áú¹®
# Áú¹®°ú ´äº¯
# °¡ÀÔ ¹®ÀÇ
Ä¿¹Â´ÏƼ
# ÀÚÀ¯°Ô½ÃÆÇ
# ¸®´ª½ºÆÁ
# ¾ÆÀÌÅ¥ Å×½ºÆ®
# ³»È¨ ¼Ò°³
# °Ö·¯¸®
# ÀÚ·á½Ç

  ¸®´ª½ºÆÁ  Go Unix Power Tools Online Book Go Bash Guide
Read No. 39 article 2001-08-20 06:02:51
NickName   Ç®ºñ´©
Subject   Å°º¸µåÀÚÆÇ ¸ðÁ¶¸® »ç¿ëÇϱâ.(ÇÑ¿µÅ°,ÇÑÀÚ,À©µµ¿ìÅ° µî)
±Û¾´ÀÌ: ´ÜnÅ°

/* ¾µµ¥¾ø´Â¼Ò¸®
 *
 * ÀÌ ±ÛÀº ÀÌ¹Ì ¿©·¯¹ø ¿Ã¶ó¿Ô´ø ±ÛÀÔ´Ï´Ù.
 * Á¦°¡ ´Ù½Ã ¾²°íÀÚ ÇÏ´Â ÀÌÀ¯´Â ´ëºÎºÐÀÇ ¼³¸íÀÌ ³Ê¹« 105, 106Å° 
 * ÀÚÆÇ¿¡¸ÂÃçÁ® Àֱ⠶§¹®¿¡ º¸´Ù ÀϹÝÀûÀÎ ±ÛÀÌ ÇÊ¿äÇÏ´Ù´Â 
 * »ý°¢¶§¹®À̾ú½À´Ï´Ù. 
 * Àú´Â ¿Ö ¾ÆÁ÷±îÁö ¸¹Àº ¹èÆ÷ÆÇ¿¡¼­ Å°º¸µå¸ÊÀÇ Áö¿ªÈ­¸¦ ¹èÁ¦ÇÏ´ÂÁö
 * ÀÌÇØÇÒ ¼ö°¡ ¾ø½À´Ï´Ù.
 * ¸Çµå·¹ÀÌÅ©´Â ¾î´ÀÁ¤µµ ¹è·ÁÇß°í, ¹ÌÁöµµ ¿¹Àü¹öÀü¿¡¼­ ÀÌ°ÍÀ»
 * Àß ¹è·ÁÇß½À´Ï´Ù.(¿äÁòÀº »ç¿ëÇÏÁö ¾Ê±â¶§¹®¿¡ ¸ð¸£°Ú½À´Ï´Ù.)
 * ÀÌ·± ¹è·Á¸¦ °¡Àå ÀßÇÑ ¹èÆ÷ÆÇÀº Á¦°¡ ½áº» °Í Áß¿£ 
 * µ¥ºñ¾ÈÀ̾ú½À´Ï´Ù. ;-)
 * 
 *  ÀÌ ±ÛÀº ´Ù¼Ò ±æ°Ô ÀÛ¼ºµÇ¾úÁö¸¸ 
 *  ÇÑ ¹ø Çغ¸½Ã¸é ±Ý¹æ ¾Æ½Ã°Ô µÉ °Ì´Ï´Ù.
 *
*/

* ¾î¶² °úÁ¤À» °ÅÄ¡´ÂÁö °£·«ÇÑ ¼Ò°³

$ : xev(À̺¥Æ® Å×½ºÅÍ Çñ׷¥)¸¦ ÅëÇØ ÀڱⰡ »ç¿ëÇÏ°íÀÚ ÇÏ´Â
   Å°ÄÚµå(keycode)°ªÀ» ¾Ë¾Æ³½´Ù.
$ : xmodmapÀ» ½ÇÇà½ÃÄÑ keycode°ª°ú key system nameÀ» ¿¬°áÇÑ´Ù.
$ : xev¸¦ °è¼Ó ½ÇÇà½ÃÅ°¸é¼­ ¿À·ù´Â ¾ø´ÂÁö, Å°°ª°ú Å°À̸§ÀÌ Àß ¿¬°á
   µÆ´ÂÁö È®ÀÎÇÑ´Ù.
$ : /etc/X11/XmodmapÆÄÀÏÀ̳ª ~/.XmodmapÆÄÀÏ¿¡ º¯°æ»çÇ×À» Àû´Â´Ù.
$ : X¸¦ ´Ù½Ã¶ç¿î´Ù.
$ : ÀÚ½ÅÀÌ »ç¿ëÇÏ´Â À©µµ¿ì¸Å´ÏÁ®¿¡¼­ ¿øÇÏ´Â Å°¸¦ Å°¹ÙÀεùÇÑ´Ù.

  # ³ëÆ®ºÏ»ç¿ëÀÚ°¡ ¾Ë¾Æ¾ßÇÒ ÀϹÝÀûÀÎ »çÇ× (¾Æ´Ñ ºÐµéÀº Åë°ú)
  # ³ëÆ®ºÏ¿¡¼­´Â Å° °³¼ö¸¦ ÁÙÀÌ´Â °úÁ¤¿¡¼­ Ưº°ÇÑ °æ¿ì¸¦ °®½À´Ï´Ù.
  # ÇÑ/¿µÅ°°¡ ½ÇÁ¦·Î´Â "¿À¸¥ÂÊ ¾ËÆ®(Alt_R)"Å°¿Í °°½À´Ï´Ù.
  # ÇÑÀÚÅ° ¿ª½Ã ½ÇÁ¦·Î´Â "¿À¸¥ÂÊ ÄÁÆ®·Ñ(Ctrl_R)"Å°¿Í °°½À´Ï´Ù.
  # ±âŸ ÀÎÅͳÝÅ°³ª ´Ù¸¥ Å°´Â ¾ð±ÞÇÏÁö ¾Ê¾Ò½À´Ï´Ù.

* ±×·³ ÀÌÁ¦ºÎÅÍ °°ÀÌ.. 

// ====================================================
//   * xev¿Í xmodmapÀÇ »ç¿ë
// ====================================================
¿ì¼± Å͹̳ÎÀ» Çϳª ¶ç¿ì¼Å¼­ 
xev¸¦ ½ÇÇà½Ãŵ´Ï´Ù.
$ xev ±×·¯¸é ÀÌ»óÇÑ Ã¢ÀÌ Çϳª ¶ßÁÒ?
âÁ¦¸ñ¿¡´Â "Event Tester"¶ó´Â ±Û¾¾°¡ ¾º¿©ÀÖ±¸¿ä.
¸¶¿ì½º¸¦ ¿òÁ÷ÀÏ ¶§¸¶´Ù Å͹̳ο¡´Â ºÐÁÖÈ÷ ÀÌ»óÇÑ ¼ýÀÚµéÀÌ
¿À°¡±¸¿ä

Event¶õ ¸»Àº ÇÁ·Î±×·¡¹ÖÀ» ÇϽô ºÐÀ̶ó¸é ½±°Ô ´«Ä¡Ã¤¼Ì°ÚÁÒ?
ÀÚ¼¼È÷ º¸½Ã¸é ¸¶¿ì½ºÀÇ ¿òÁ÷ÀÓÀ» °¨ÁöÇÔÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù.
À̹ø¿£ "a"¸¦ ´©¸¨´Ï´Ù. ´Ù½Ã ¶Á´Ï´Ù.
±×·¯¸é µÎ¹øÀÇ À̺¥Æ®°¡ °¨ÁöµÊÀ» ¾Ë ¼ö ÀÖ½À´Ï´Ù
ÀÚ¼¼È÷´Â ¾Ë ¼ö ¾øÁö¸¸ Å° ÇÑ °³ÀÇ ½ÅÈ£¸¦ ¹Þ±â À§Çؼ­´Â 
´­·¶´Ù°¡(ÇÑ ¹ø) ¶¼³»´Â(¶Ç ÇÑ ¹ø)°úÁ¤ÀÌ ÇÊ¿äÇÑ °Í °°½À´Ï´Ù.

±×·¯¸é ¹®Á¦ÀÇ ÇÑ¿µÅ°³ª ÇÑÀÚÅ°¸¦ ´­·¯º¼±î¿ä?
±×·¯¸é ºÐ¸í ¹º°¡ À̺¥Æ®´Â ÀϾ´Â µí ½ÍÁö¸¸
"a"¸¦ ´­·¶À» ¶§¿Í ´Ù¸¥ Á¡ÀÌ ÀÖ½À´Ï´Ù.
state 0x0, keycode 122 (keysym 0x0, NoSymbol), same_screen 

ÇÑ¿µÅ°¸¦ ´­·¶Áö¸¸ NoSymbolÀ̶ó´Â ¹®±¸°¡ º¸À̽ÃÁÒ?
Áï... ±â°èÀûÀ¸·Î´Â ±× Å°°ª(122)°¡ ÀÖÁö¸¸ ÇöÀç ¸®´ª½º¹Ú½º¿¡¼­
±×°É ÀνÄÇÒ À̸§ÀÌ ¾ø´Â °ÍÀÔ´Ï´Ù. ÀÖÀ¸³ª¸¶³ªÇÑ Å°°¡ µÇ´Â °ÍÀÌÁÒ.
ÀÌ ¹®Á¦´Â ƯÈ÷ "¾Æ¹Ì"ÀԷ±⿡¼­ ³ªÅ¸³ªÁÒ.
À©µµ¿ì¿¡ Àͼ÷ÇϽźеéÀÌ °¡Àå ¾Ö¸¦ ¸Ô´Â°Ô ¾Æ¸¶ ÇÑ/¿µÅ°¸¦ ÀÌ¿ëÇÑ
ÇÑ¿µ ÀüȯÀÌ ¾ÈµÇ´Â °ÍÀÌÁÒ.
´ÙÀ½À» ½ÇÇàÇØ º¾´Ï´Ù.

$ xmodmap -e "keycode 122 = Hangul"
$

±×·± ´ÙÀ½ ´Ù½Ã xev·Î µ¹¾Æ°¡¼­ ÇÑ/¿µÅ°¸¦ ´Ù½Ã ´©¸¨´Ï´Ù.
¾Æ¹Ì¿¡¼­µµ Àû¿ëµÇ´ÂÁö È®ÀÎÇØ º¾´Ï´Ù.(ÇÑÅÒÀº º¸Àå¸øÇÕ´Ï´Ù.)

Á¦´ë·Î ¿¬°áÀÌ µÈ °ÍÀÌ È®ÀÎÀÌ µÇ¼ÌÀ¸¸é ´Ù¸¥ Å°µµ ºñ½ÁÇÑ ¹æ½ÄÀ»
µû¸¨´Ï´Ù.


´Ü ÁÖÀÇÇϽǰÍÀÌ "Hangul"°ú °°ÀÌ Å°À̸§À» »ç¿ëÇϽǷÁ¸é
ÀÌ¹Ì ¿¹¾à µÇ¾îÀÖ´Â À̸§À» »ç¿ëÇÏ¼Å¾ß ÇÕ´Ï´Ù. 
¸¸ÀÏ ´ÙÀ½°ú °°Àº °æ¿ì
$ xmodmap -e "keycode 115 = windog"
xmodmap:  commandline:0:  bad keysym name 'Windog' in keysym list
xmodmap:  1 error encountered, aborting.
$

À§¿Í °°ÀÌ ¿¡·¯¸¦ ³ªÅ¸³À´Ï´Ù.

´ë°³ ¸¹Àº ½Ã½ºÅÛ¿¡¼­...

À©µµ¿ìÅ° ---> Hyper_L Hyper_R
¸Þ´ºÅ°   ---> Menu ȤÀº Super_R

µîÀ¸·Î »ç¿ëÇÕ´Ï´Ù. Àý´ë, Àý´ëÀûÀÎ °ÍÀÌ ¾Æ´Ï¹Ç·Î ÄÄÇ»ÅÍ°¡ ÀνÄÇÏ´Â
À̸§ÀÌ¸é ¾ðÁ¦µçÁö, ¹«¾ùÀ̵çÁö »ç¿ë°¡´ÉÇÕ´Ï´Ù.

¿©ÇÏÆ° À§¿Í °°ÀÌ xmodmap°ú xev·Î keycode¿Í keysystem nameÀ»
¿¬°á½ÃÄÑ°¡¸é¼­ Á¦´ë·Î ¿¬°áÀÌ µÇ°í ÀÖ´ÂÁö È®ÀÎÇÕ´Ï´Ù.

// ====================================================
//   * X¼³Á¤ ÆÄÀÏ(Xmodmap)ÆÄÀÏ¿¡ ÀúÀå.
// ====================================================

ÀÌÁ¦ º¯°æµÈ »çÇ×À» X°¡ ¶ã ¶§¸¶´Ù Àû¿ëÇϵµ·Ï ÇÕ´Ï´Ù.
/etc/X11/Xmodmap¿¡ ½á¼­ ÀüüÀû¼³Á¤(global setting)À» Çϼŵµ µÇ°í
~/.XmodmapÀ» ¸¸µé¾î¼­ Áö¿ª¼³Á¤À» Çϼŵµ ÁÁ½À´Ï´Ù.

ÈÄÀÚÀÇ °æ¿ì¸¦ Áß½ÉÀ¸·Î ¼³¸íÇÏ°Ú½À´Ï´Ù.
xmodmapÀ» ½ÇÇàÇß´ø ÆÄÀÏÀ» ´Ý½À´Ï´Ù.
´Ù½Ã Å͹̳ÎÀ» ¶ç¿ó´Ï´Ù.(È÷½ºÅ丮¸¦ ÀÌ¿ëÇϱâ À§Çؼ­)
$ grep xmodmap ~/.bash_history | grep keycode
xmodmap -e "keycode 122 = Hangul"
xmodmap -e "keycode 121 = Hangul_Hanja"
xmodmap -e "keycode 115 = Windog"
xmodmap -e "keycode 115 = Hyper_L"
xmodmap -e "keycode 116 = Hyper_R"
xmodmap -e "keycode 117 = Menu"
$ !! | sed -e "s/\(xmodmap -e.\"\) *\(.*\) *\"/\2/g"
keycode 122 = Hangul
keycode 121 = Hangul_Hanja
keycode 115 = Windog
keycode 115 = Hyper_L
keycode 116 = Hyper_R
keycode 117 = Menu
$ !! > ~/.Xmodmap # ¼³Á¤ ³»¿ëÀ» ÀúÀåÇÕ´Ï´Ù.

ÀÌ·¸°Ô ÇϽŴÙÀ½¿¡ .XmodmapÆÄÀÏÀ» ¿­¾î¼­ Áߺ¹µÈ ºÎºÐÀ» »©°Å³ª
À߸øµÈ ºÎºÐÀ» °íÄ¡½Ã¸é µË´Ï´Ù.
Á¤±Ô½ÄÇ¥ÇöÀÌ ¾î·Á¿ì½Ã¸é Á÷Á¢ À§¿Í °°Àº ÇüÅ·ΠÆíÁýÇϼŵµ µË´Ï´Ù.


Àü¿ª¼³Á¤À» ¿øÇϽøé...
À§ÀÇ ÆÄÀÏÀ»...
# cat ~somebody/.Xmodmap >> /etc/X11/Xmodmap
# 

À§¿Í °°ÀÌ ÇÏ½Ã¸é µË´Ï´Ù.

ÀÌÁ¦ X¸¦ ´Ù½Ã ¶ç¿ì½Ã°í ¹Ù²ï ¼³Á¤ÀÌ Á¦´ë·Î µÆ´ÂÁö
È®ÀÎÇÏ½Ã¸é µË´Ï´Ù. 

ÀÚ½ÅÀÌ ¿øÇÏ´Â À©µµ¿ì ¸Å´ÏÀúÀÇ Å°¹ÙÀεù¿¡ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.

#### ³¡ (ÀÌÇÏ º°·Î Áß¿äÇÏÁö ¾ÊÀº ³»¿ë) ###########



´õ¿í ÀÚ¼¼ÇÑ »çÇ×À» ¿øÇÏ½Ã¸é ¿ª½¬ man xmodmapÇÏ¼Å¾ß °ÚÁö¿ä ;-)

keysymÀ̳ª add¸í·Éµµ ÀûÀýÈ÷ »ç¿ëÇÏ¸é ±¦Âú½À´Ï´Ù.

add Mod2 = Hyper_L

ÀÌ·¸°Ô ÇϽøé Mod2¶ó´Â À̸§À¸·Î Hyper_LÅ°¸¦ ´ë½Å ÇÒ ¼ö ÀÖÁÒ.

º¸³Ê½º...(Àϱî?) ÀúÀÇ .bbkeysrcÆÄÀÏ

KeyToGrab(Right),WithModifier(Control+Mod1),WithAction(NextWorkspace)
KeyToGrab(Left),WithModifier(Control+Mod1),WithAction(PrevWorkspace)
KeyToGrab(1),WithModifier(Control),WithAction(ExecCommand),DoThis(hanterm)
KeyToGrab(Tab), WithModifier(Mod1), WithAction(NextWindow)
KeyToGrab(F4), WithModifier(Mod1), WithAction(Close)
KeyToGrab(Hyper_R),WithModifier(Shift),WithAction(ExecCommand),DoThis(mozilla)
KeyToGrab(bracketright),WithModifier(Mod1),WithAction(MaximizeWindow)
KeyToGrab(Right),WithModifier(Control),WithAction(MaximizeHorizontal)
KeyToGrab(Up), WithModifier(Control), WithAction(ShadeWindow)
KeyToGrab(Down),WithModifier(Control),WithAction(MaximizeVertical)
KeyToGrab(Up), WithModifier(Mod2), WithAction(BigNudgeUp)
KeyToGrab(Down), WithModifier(Mod2), WithAction(BigNudgeDown)
KeyToGrab(Right), WithModifier(Mod2),WithAction(BigNudgeRight)
KeyToGrab(Left), WithModifier(Mod2), WithAction(BigNudgeLeft)

³ëÆ®ºÏ¿¡¼­ »ç¿ëÁßÀÎ bbkeysrcÀÔ´Ï´Ù.
Hyper_RÀº ÀÎÅͳÝÅ°¿¡ ¹°·Á »ç¿ëÇÏ°í ÀÖ°í, 
Mod2´Â ½ÇÁ¦·Î´Â Hyper_LÅ°(À©µµ¿ìÅ°)ÀÔ´Ï´Ù.

±×·³ À̸¸...

--
³­µ¥¾øÀÌ ÈÞÇоȵȴٰí ÇÏ¸é ¾î¶»ÇÏÁö ¤Ñ¤Ñ;;;;
Regist Addr [ 210.221.19.151 ] ¸ñ·Ïº¸±â À­±Û ¾Æ·§±Û
Á¤±ÔÇ¥Çö½Ä [ »ó¼¼ °Ë»ö ]
Page Loading [ 0.03 Sec ] SQL Time [ 0 Sec ]

Copyleft 1999-2024 by JSBoard Open Project
Theme Designed by IDOO And follow GPL2

°³ÀÎÁ¤º¸ Ãë±Þ¹æħ ÀÌ¿ë ¾à°ü »çÀÌÆ® ¸Ê ¾îµå¹Î °ü¸®