diff --git a/lib/behat/form_field/behat_form_field.php b/lib/behat/form_field/behat_form_field.php
index <HASH>..<HASH> 100644
--- a/lib/behat/form_field/behat_form_field.php
+++ b/lib/behat/form_field/behat_form_field.php
@@ -106,7 +106,9 @@ class behat_form_field {
         // using the generic behat_form_field is because we are
         // dealing with a fgroup element.
         $instance = $this->guess_type();
-        return $instance->field->keyPress($char, $modifier);
+        $instance->field->keyDown($char, $modifier);
+        $instance->field->keyPress($char, $modifier);
+        $instance->field->keyUp($char, $modifier);
     }
 
     /**
MDL-<I> behat: Key press should be down-press-up

As we simulate real user key press event, the
event should down followed by press and then up key