[완료] 키보드 누르는 걸 시뮬레이션해주는 명령어나 프로그램
글쓴이: dl3zp3 / 작성시간: 화, 2008/07/29 - 6:41오후
키보드누르는 걸 시뮬레이션해주는 리눅스 프로그램이 어떤게 있나요?
예를 들어서 그 프로그램의 이름이 keypress이면
Gnome-Terminal에서 다음과 같이 하면~$ keypress "Alt+PrintScreen"
마치 Alt+PrintScreen을 실제로 누른 것처럼 터미널창의 스크린샷이 찍히고,~$ keypress "Alt+Tab"
위와 같이 입력하면 마치 Alt+Tab을 누른 것처럼 다음 창으로 넘어가겠죠.
Forums:
perl에서는 Expect.pm 모듈이 있습니다.
원하시는 것처럼 "Alt+Tab"과 같이 key press를 할 수 있는지는 모르겠습니다.
perl에서 expect 모듈은 일반적으로 ssh, scp 등에서 password를
keyboard로 입력하는 대신에 프로그램에서 입력할 수 있도록 하는 모듈입니다.
http://search.cpan.org/~rgiersig/Expect-1.21/
------------------------------------------------------------
If you do not expect the unexpected, you will not find it;
for it is hard to be sought out, and difficult. [Heraclitus]
------------------------------------------------------------
If you do not expect the unexpected, you will not find it;
for it is hard to be sought out, and difficult. [Heraclitus]
비슷한 질문이
비슷한 질문이 있네요..
http://www.linux.com/forums/topic/1978
저도 써보지는 않았지만 도움이 되길 바랍니다.
모두 답변
모두 답변 감사드립니다
링크를 살펴봤는데 xmacro가 제가 원하는 프로그램인 것 같습니다.
xmacro를 설치한 후, Ctrl+F12를 누르는 걸 시뮬레이션하려면
keypress-ctrl-f12라는 파일에
KeyStrPress Control_L
KeyStrPress F12
KeyStrRelease Control_L
KeyStrRelease F12
라고 쓰고 저장한 후, 명령창에서 다음과 같이 입력하면 됩니다.
xmacroplay :0.0 < keypress-ctrl-f12
키보드입력과 마우스입력 등을 레코딩해서 keypress-whatever라는 파일에 저장하려면 :
xmacrorec2 > keypress-whatever
레코딩한 것을 시뮬레이션하려면 :
xmacroplay :0.0 < keypress-whatever
댓글 달기