Man on trial in deputy's shooting