#pragma once

#include "condition.h"

namespace roy {

    namespace ih {

        class key_down_cdt : public condition
        {
        public:
            key_down_cdt(void);
            key_down_cdt(UINT vk, bool init_down = false);

            virtual bool    OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
            virtual bool    OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags);

            virtual void    OnEntering(void);

        public:
            
            virtual bool    is_valid(void);

        protected:
            UINT            _vk;
            bool            _init_down;
            bool            _down;
        };

    }

}

