Skip to content
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

Add <bs>, <wait5>, <wait10>, <del> special keys (Packerisms) #989

Merged
merged 2 commits into from Oct 23, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/veewee/provider/core/helper/scancode.rb
Expand Up @@ -38,12 +38,15 @@ class Scancode
@@special_keys=Hash.new;
@@special_keys['<Enter>'] = '1c 9c';
@@special_keys['<Backspace>'] = '0e 8e';
@@special_keys['<Bs>'] = '0e 8e';
@@special_keys['<Spacebar>'] = '39 b9';
@@special_keys['<Return>'] = '1c 9c'
@@special_keys['<Esc>'] = '01 81';
@@special_keys['<Tab>'] = '0f 8f';
@@special_keys['<KillX>'] = '1d 38 0e b8';
@@special_keys['<Wait>'] = 'wait';
@@special_keys['<Wait5>'] = 'wait5';
@@special_keys['<Wait10>'] = 'wait10';

@@special_keys['<Up>'] = '48 c8';
@@special_keys['<Down>'] = '50 d0';
Expand All @@ -52,6 +55,7 @@ class Scancode
@@special_keys['<End>'] = '4f cf';
@@special_keys['<Insert>'] = '52 d2';
@@special_keys['<Delete>'] = '53 d3';
@@special_keys['<Del>'] = '53 d3';
@@special_keys['<Left>'] = '4b cb';
@@special_keys['<Right>'] = '4d cd';
@@special_keys['<Home>'] = '47 c7';
Expand Down
12 changes: 7 additions & 5 deletions lib/veewee/provider/virtualbox/box/helper/console_type.rb
Expand Up @@ -29,11 +29,13 @@ def send_virtualbox_sequence(sequence)
# A workaround is to send the scancodes one-by-one.
codes=""
for keycode in keycodes.split(' ') do
unless keycode=="wait"
send_keycode(keycode)
sleep 0.01
else
sleep 1
case keycode
when 'wait' then sleep 1
when 'wait5' then sleep 5
when 'wait10' then sleep 10
else
send_keycode(keycode)
sleep 0.01
end
end
#sleep after each sequence (needs to be param)
Expand Down