keys is an instance of FlxKeyboard - a helper object that is used to track keyboard input.

// Detect if the up arrow key is pressed
if (FlxG.keys.pressed.UP)
{
	sprite.velocity.y = -100;
}

It’s also easy to detect a key press among various keys.

// Detect if either the W key or the up arrow key is pressed
if (FlxG.keys.anyPressed([UP, W]))
{
	sprite.velocity.y = -100;
}

Demonstration

package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.ui.FlxVirtualPad;

class PlayState extends FlxState
{
	var sprite:FlxSprite;
	var pad:FlxVirtualPad;
	
	override function create()
	{
		super.create();
		
		sprite = new FlxSprite("assets/sprite.png");
		sprite.screenCenter();
		add(sprite);
		
		pad = new FlxVirtualPad(FlxDPadMode.FULL, FlxActionMode.NONE);
		add(pad);
	}
	
	override function update(elapsed:Float)
	{
		super.update(elapsed);
		
		var up:Bool = pad.buttonUp.pressed || FlxG.keys.anyPressed([UP, W]);
		var down:Bool = pad.buttonDown.pressed || FlxG.keys.anyPressed([DOWN, S]);
		var left:Bool = pad.buttonLeft.pressed || FlxG.keys.anyPressed([LEFT, A]);
		var right:Bool = pad.buttonRight.pressed || FlxG.keys.anyPressed([RIGHT, D]);
		
		if (up && down)
			up = down = false;
		if (left && right)
			left = right = false;
			
		if (up)
			sprite.velocity.y = -100;
		else if (down)
			sprite.velocity.y = 100;
		else
			sprite.velocity.y = 0;
			
		if (left)
			sprite.velocity.x = -100;
		else if (right)
			sprite.velocity.x = 100;
		else
			sprite.velocity.x = 0;
	}
}