使用旧手检做成蓝牙键盘

这篇具有很好参考价值的文章主要介绍了使用旧手检做成蓝牙键盘。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

看了一个视频,可以将旧手机改成蓝牙键盘进行输入,于是想试试。这一搞就搞了近一个月。本人不太会编程,只是写过个人用得着的程序,简化手中的工作。对于android开发并不懂。突击学习了一下蓝牙的知识。本来以为很简单。开始用微软的xamarin开发,毕竟微软的东西好用,而且语法熟悉。但后来发现xamarin的资料很少,最多的还是android java的。于是下了个android studio进行学习。一开始就发现grandle不好搞 ,搞 了很多天后搞定,至少可以运行demo程序了。但一直没有进展,有很多介绍客户端,服务器端的,在github上找了很多,倒有一些可以实现,但程序看不懂。本来想放弃,后来在csdn上看了几个大侠写的东西,又进行了测试,突然有一天发现测试通了。可以了。现在就将这个简单的程序给大家,有兴趣的同志可以看看。

手机做蓝牙键盘应该有很多种,我用的是最简单的。原来在ApI版本比较低的时候,有些人用了很多底层的技术,实现得非常好。但我看不懂。如github上有一个程序kontroller,在低API下可以运行,升级后无法运行。看了代码,本人水平太低,看不懂。最后实现的是用API28以后的版本,也非常简单,也是如csdn上很多大侠所说的那样,就是几个回调函数。这样将手机变成了蓝牙键盘。

这时候蓝牙既不是客户端,也不是服务器端。然后再去连接。我用的很简单,要求API31上,因为好象现在的蓝牙连接需要动态获取权限,我写的语句就是直接从网上抄下来的,成功动态给了权限。其他也不说什么,这是完整的代码,其实就是一个文件,另一个是定义HID设备的类。写的代码不规范,就是给大家个思路,再次感谢csdn上的大侠们。

package com.example.sendkeyboard;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import android.Manifest;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothHidDevice;
import android.bluetooth.BluetoothHidDeviceAppQosSettings;
import android.bluetooth.BluetoothHidDeviceAppSdpSettings;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.StrictMode;
import android.provider.SyncStateContract;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.Executors;

public class MainActivity extends AppCompatActivity {

    BluetoothAdapter mBluetoothAdapter;
    BluetoothHidDevice mBluetoothHID;
    public String TAG = "Proxy Program";
    boolean connected;
    private BluetoothManager mBluetoothManager;
    boolean IsRegisted;
    BluetoothDevice ConnectedDevice;
    private BluetoothProfile.ServiceListener mProfileListener = new BluetoothProfile.ServiceListener() {
        public void onServiceConnected(int profile, BluetoothProfile proxy) {
            //Log.d(TAG, "Connecting HIDService...");
            if (profile == BluetoothProfile.HID_DEVICE) {

                if (!(proxy instanceof BluetoothHidDevice)) {
                    Log.e(TAG, "Proxy received but it's not BluetoothHidDevice");
                    return;
                }


                Log.d(TAG, "Connecting HIDService...");
                mBluetoothHID = (BluetoothHidDevice) proxy;
                BluetoothHidDeviceAppSdpSettings sdp = new BluetoothHidDeviceAppSdpSettings(HidConfig.NAME, HidConfig.DESCRIPTION,
                        HidConfig.PROVIDER, BluetoothHidDevice.SUBCLASS1_COMBO, HidConfig.KEYBOARD_DESCRIPTOR);
//
                if (ActivityCompat.checkSelfPermission(MainActivity.this, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) {
                    // TODO: Consider calling
                    //    ActivityCompat#requestPermissions
                    // here to request the missing permissions, and then overriding
                    //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
                    //                                          int[] grantResults)
                    // to handle the case where the user grants the permission. See the documentation
                    // for ActivityCompat#requestPermissions for more details.

                    Log.d(TAG, "Return before register");
                    String[] list = new String[]{Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT};

                    requestPermissions(list, 1);
                    Log.d(TAG, "Return before register");
                    return;
                }

                BluetoothHidDeviceAppQosSettings inQos = new BluetoothHidDeviceAppQosSettings(
                        BluetoothHidDeviceAppQosSettings.SERVICE_GUARANTEED, 200, 2, 200,
                        10000 /* 10 ms */, 10000 /* 10 ms */);
                BluetoothHidDeviceAppQosSettings outQos = new BluetoothHidDeviceAppQosSettings(
                        BluetoothHidDeviceAppQosSettings.SERVICE_GUARANTEED, 900, 9, 900,
                        10000 /* 10 ms */, 10000 /* 10 ms */);

                mBluetoothHID.registerApp(sdp, inQos, outQos, Executors.newCachedThreadPool(), mCallback);
                //startActivityForResult(new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE), 1);
                //https://blog.csdn.net/lgdlchshg/article/details/127469781
            }
        }

        public void onServiceDisconnected(int profile) {
            if (profile == BluetoothProfile.HID_DEVICE) {
                Log.d(TAG, "Unexpected Disconnect of HIDService...");
                mBluetoothHID = null;

                mBluetoothHID.unregisterApp();


            }


        }

    };
    public final BluetoothHidDevice.Callback mCallback = new BluetoothHidDevice.Callback() {
        @Override
        public void onAppStatusChanged(BluetoothDevice pluggedDevice, boolean registered) {
            IsRegisted = registered;
            if(registered){
                Log.d(TAG, "register OK!....................");
            }
        }

        @Override
        public void onConnectionStateChanged(BluetoothDevice device, int state) {
            if (state == BluetoothProfile.STATE_DISCONNECTED) {
                connected = false;
                Log.d(TAG, "hid state is disconnected");
            } else if (state == BluetoothProfile.STATE_CONNECTED) {
                connected = true;
                Log.d(TAG, "hid state is connected");
                Log.d(TAG, "----------------------------------------hid state is connected");
                Log.d(TAG, device.getName().toString());

//                byte mBuffer = (byte) 63;
//                mBluetoothHID.sendReport(device,32, mBuffer); // 不知道为啥子这样写?
                ConnectedDevice = device;
            } else if (state == BluetoothProfile.STATE_CONNECTING) {
                Log.d(TAG, "hid state is connecting");
            }
        }
    };


    public void ShowBlueToothKB() {
        mBluetoothAdapter.getProfileProxy(this, mProfileListener, BluetoothProfile.HID_DEVICE);

    }

    public void SendBKToHost() {
        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) {
            // TODO: Consider calling
            //    ActivityCompat#requestPermissions
            // here to request the missing permissions, and then overriding
            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
            //                                          int[] grantResults)
            // to handle the case where the user grants the permission. See the documentation
            // for ActivityCompat#requestPermissions for more details.
            Log.e(TAG, "check permission Error ,Exit SendBKtohost Function");
            String[] list = new String[]{Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT};

            requestPermissions(list, 1);

            return;
        }
//      onKeyDown((byte) 0x09);
//      onKeyUp((byte) 0x09);
        Log.e(TAG, "----------------Preparing Send Key------------------");
       // mBluetoothHID.sendReport(ConnectedDevice,2, new byte[]{0, 0,(byte)0x09, 0, 0, 0, 0, 0});
        //mBluetoothHID.sendReport(ConnectedDevice,2, new byte[]{0,0,0,0,0,0,0,0});
        // sendKey("F");
        //sendKey("_");
        sendKey("enter");
        try {
            Thread.sleep( 1000 );
        } catch (Exception e){
            System.exit( 0 ); //退出程序
        }

        sendKey("S");
        
        sendKey("enter");
//        sendKey(">");
//        sendKey("*");
        //sendKey("enter");
    }
    public void sendStringtodevice(String str)
    {
        for (int i=0;i<str.length();i++) {
            sendKey(str.substring(i,i+1));
        }

    }
    public void ConnectotherBluetooth() {

        ConnectedDevice = mBluetoothAdapter.getRemoteDevice("04:7F:0E:40:74:6E");
        if (ConnectedDevice != null) {
            Log.e(TAG, "Connected Device is OK");
            Log.e(TAG, ConnectedDevice.getName());
        }
        mBluetoothHID.connect(ConnectedDevice);//用代理去联接已联接的蓝牙设备,就能保证连接上
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        inithashMap();
        mBluetoothManager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
        mBluetoothAdapter = mBluetoothManager.getAdapter();
       //permit network in Main UI thread
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);

        Button btnInit = findViewById(R.id.btninit);
        btnInit.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //readData();
                ShowBlueToothKB();
            }


        });
        ImageView imgsend=findViewById(R.id.imgsend);
        imgsend.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Log.e(TAG, "check permission");
                String[] list = new String[]{Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT};

                requestPermissions(list, 1);

                SendBKToHost();    //readData();

            }


        });
        ImageView imgbalckscreen=findViewById(R.id.imgbalckescreen);
        imgbalckscreen.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                Log.e(TAG, "Send Blank screen");

                SendBBKMessage();    //readData();

            }


        });




        Button btnconnect = findViewById(R.id.btnconnect);
        btnconnect.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e(TAG, "Connect other BlueTooth");
//            String[] list =new String[]{Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT};
//
//            requestPermissions(list, 3);

                ConnectotherBluetooth();


            }


        });


    }



    public void SendBBKMessage()
    {

        Log.e(TAG,"Send Message to Host");
        try
        {
            Socket socket = new Socket("127.0.0.1", 10086);//


            OutputStream outputStream = socket.getOutputStream();

            outputStream.write('s');
            outputStream.flush();

            //socket.SendUrgentData('S');
            //2.拿到客户端的socket对象的输出流发送给服务器数据
            //text1.setText("BBB");
            outputStream.close();
            socket.close();

        }
        catch (IOException e)
        {
            e.printStackTrace();
            return;







        }

    }

    private byte[] mBuffer = new byte[8];
    int id = 2;




    public void sendKey(String key) {
        byte b1 = 0;

        if (key.length() <= 1) {
            char keyChar = key.charAt(0);
            if ((keyChar >= 65) && (keyChar <= 90)) {
                b1 = 2;
            }
        }


        if (SHITBYTE.containsKey(key)) {
            b1 = 2;
        }


        mBluetoothHID.sendReport(ConnectedDevice, 2, new byte[]{b1, 0, KEY2BYTE.get(key.toUpperCase()),0,0,0,0,0});
        mBluetoothHID.sendReport(ConnectedDevice, 2,  new byte[]{0,0, 0,0,0,0,0,0});

    }
    public  Map<String,Byte> KEY2BYTE = new HashMap<String,Byte>();
    public  Map<String,Boolean> SHITBYTE = new HashMap<String,Boolean> ();

    public void inithashMap()
    {
        KEY2BYTE.put("A", (byte) 4);
        KEY2BYTE.put("B",(byte)5);
        KEY2BYTE.put("C",(byte)6);
        KEY2BYTE.put("D",(byte)7);
        KEY2BYTE.put("E",(byte)8);
        KEY2BYTE.put("F",(byte)9);
        KEY2BYTE.put("G",(byte)10);
        KEY2BYTE.put("H",(byte)11);
        KEY2BYTE.put("I",(byte)12);
        KEY2BYTE.put("J",(byte)13);
        KEY2BYTE.put("K",(byte)14);
        KEY2BYTE.put("L",(byte)15);
        KEY2BYTE.put("M",(byte)16);
        KEY2BYTE.put("N",(byte)17);
        KEY2BYTE.put("O",(byte)18);
        KEY2BYTE.put("P",(byte)19);
        KEY2BYTE.put("Q",(byte)20);
        KEY2BYTE.put("R",(byte)21);
        KEY2BYTE.put("S",(byte)22);
        KEY2BYTE.put("T",(byte)23);
        KEY2BYTE.put("U",(byte)24);
        KEY2BYTE.put("V",(byte)25);
        KEY2BYTE.put("W",(byte)26);
        KEY2BYTE.put("X",(byte)27);
        KEY2BYTE.put("Y",(byte)28);
        KEY2BYTE.put("Z",(byte)29);

        KEY2BYTE.put("1",(byte)30);
        KEY2BYTE.put("2",(byte)31);
        KEY2BYTE.put("3",(byte)32);
        KEY2BYTE.put("4",(byte)33);
        KEY2BYTE.put("5",(byte)34);
        KEY2BYTE.put("6",(byte)35);
        KEY2BYTE.put("7",(byte)36);
        KEY2BYTE.put("8",(byte)37);
        KEY2BYTE.put("9",(byte)38);
        KEY2BYTE.put("0",(byte)39);

        KEY2BYTE.put("ENTER",(byte)40);
        KEY2BYTE.put("ESC",(byte)41);
        KEY2BYTE.put("BACK_SPACE",(byte)42);
        KEY2BYTE.put("TAB",(byte)43);
        KEY2BYTE.put("SPACE",(byte)44);
        KEY2BYTE.put("-",(byte)45);
        KEY2BYTE.put("=",(byte)46);
        KEY2BYTE.put("[",(byte)47);
        KEY2BYTE.put("]",(byte)48);
        KEY2BYTE.put("\\",(byte)49);
        KEY2BYTE.put(";",(byte)51);
        KEY2BYTE.put("'",(byte)52);
        KEY2BYTE.put("`",(byte)53);
        KEY2BYTE.put(",",(byte)54);
        KEY2BYTE.put(".",(byte)55);
        KEY2BYTE.put("/",(byte)56);
        KEY2BYTE.put("SCROLL_LOCK",(byte)71);
        KEY2BYTE.put("INSERT ",(byte)73);
        KEY2BYTE.put("HOME ",(byte)74);
        KEY2BYTE.put("PAGE_UP  ",(byte)75);
        KEY2BYTE.put("DELETE ",(byte)76);
        KEY2BYTE.put("END ",(byte)77);
        KEY2BYTE.put("PAGE_DOWN ",(byte)78);
        KEY2BYTE.put("DPAD_RIGHT ",(byte)79);
        KEY2BYTE.put("KEYCODE_DPAD_LEFT ",(byte)80);
        KEY2BYTE.put("KEYCODE_DPAD_DOWN ",(byte)81);
        KEY2BYTE.put("KEYCODE_DPAD_UP ",(byte)82);
        KEY2BYTE.put("NUM_LOCK ",(byte)83);




        KEY2BYTE.put("!",(byte)30);
        SHITBYTE.put("!",true);

        KEY2BYTE.put("@",(byte)31);
        SHITBYTE.put("@",true);

        KEY2BYTE.put("#",(byte)32);
        SHITBYTE.put("#",true);

        KEY2BYTE.put("$",(byte)33);
        SHITBYTE.put("$",true);

        KEY2BYTE.put("%",(byte)34);
        SHITBYTE.put("%",true);

        KEY2BYTE.put("^",(byte)35);
        SHITBYTE.put("^",true);

        KEY2BYTE.put("&",(byte)36);
        SHITBYTE.put("&",true);

        KEY2BYTE.put("*",(byte)37);
        SHITBYTE.put("*",true);

        KEY2BYTE.put("(",(byte)38);
        SHITBYTE.put("(",true);

        KEY2BYTE.put(")",(byte)39);
        SHITBYTE.put(")",true);


        KEY2BYTE.put("_",(byte)45);
        SHITBYTE.put("_",true);

        KEY2BYTE.put("+",(byte)46);
        SHITBYTE.put("+",true);


        KEY2BYTE.put("{",(byte)47);
        SHITBYTE.put("{",true);

        KEY2BYTE.put("}",(byte)48);
        SHITBYTE.put("}",true);

        KEY2BYTE.put("|",(byte)49);
        SHITBYTE.put("|",true);

        KEY2BYTE.put(":",(byte)51);
        SHITBYTE.put(":",true);

        KEY2BYTE.put("\"",(byte)52);
        SHITBYTE.put("\"",true);

        KEY2BYTE.put("<",(byte)54);
        SHITBYTE.put("<",true);

        KEY2BYTE.put(">",(byte)55);
        SHITBYTE.put(">",true);

        KEY2BYTE.put("?",(byte)56);
        SHITBYTE.put("?",true);

    }

}

==================Hidconfig============文件文章来源地址https://www.toymoban.com/news/detail-766146.html

package com.example.sendkeyboard;

public class HidConfig {
    public final static String NAME = "My Keyboard";

    public final static String DESCRIPTION = " Keyboard";

    public final static String PROVIDER = "df";

    public   final static byte[] KEYBOARD_DESCRIPTOR =
            {
                    (byte) 0x05, (byte) 0x01,                    // USAGE_PAGE (Generic Desktop)
                    (byte) 0x09, (byte) 0x06,                    // USAGE (Keyboard)
                    (byte) 0xa1, (byte) 0x01,                    // COLLECTION (Application)
                    (byte) 0x85, (byte) 0x02,                    //REPORT_ID (2)
                    (byte) 0x05, (byte) 0x07,                    //   USAGE_PAGE (Keyboard)
                    (byte) 0x19, (byte) 0xe0,                    //   USAGE_MINIMUM (Keyboard LeftControl)
                    (byte) 0x29, (byte) 0xe7,                    //   USAGE_MAXIMUM (Keyboard Right GUI)
                    (byte) 0x15, (byte) 0x00,                    //   LOGICAL_MINIMUM (0)
                    (byte) 0x25, (byte) 0x01,                    //   LOGICAL_MAXIMUM (1)
                    (byte) 0x75, (byte) 0x01,                    //   REPORT_SIZE (1)
                    (byte) 0x95, (byte) 0x08,                    //   REPORT_COUNT (8)
                    (byte) 0x81, (byte) 0x02,                    //   INPUT (Data,Var,Abs)
                    (byte) 0x95, (byte) 0x01,                    //   REPORT_COUNT (1)
                    (byte) 0x75, (byte) 0x08,                    //   REPORT_SIZE (8)
                    (byte) 0x81, (byte) 0x03,                    //   INPUT (Cnst,Var,Abs)
                    (byte) 0x95, (byte) 0x05,                    //   REPORT_COUNT (5)
                    (byte) 0x75, (byte) 0x01,                    //   REPORT_SIZE (1)
                    (byte) 0x05, (byte) 0x08,                    //   USAGE_PAGE (LEDs)
                    (byte) 0x19, (byte) 0x01,                    //   USAGE_MINIMUM (Num Lock)
                    (byte) 0x29, (byte) 0x05,                    //   USAGE_MAXIMUM (Kana)
                    (byte) 0x91, (byte) 0x02,                    //   OUTPUT (Data,Var,Abs)
                    (byte) 0x95, (byte) 0x01,                    //   REPORT_COUNT (1)
                    (byte) 0x75, (byte) 0x03,                    //   REPORT_SIZE (3)
                    (byte) 0x91, (byte) 0x03,                    //   OUTPUT (Cnst,Var,Abs)
                    (byte) 0x95, (byte) 0x06,                    //   REPORT_COUNT (6)
                    (byte) 0x75, (byte) 0x08,                    //   REPORT_SIZE (8)
                    (byte) 0x15, (byte) 0x00,                    //   LOGICAL_MINIMUM (0)
                    (byte) 0x25, (byte) 0x65,                    //   LOGICAL_MAXIMUM (101)
                    (byte) 0x05, (byte) 0x07,                    //   USAGE_PAGE (Keyboard)
                    (byte) 0x19, (byte) 0x00,                    //   USAGE_MINIMUM (Reserved (no event indicated))
                    (byte) 0x29, (byte) 0x65,                    //   USAGE_MAXIMUM (Keyboard Application)
                    (byte) 0x81, (byte) 0x00,                    //   INPUT (Data,Ary,Abs)
                    (byte) 0xc0,                           // END_COLLECTION
                                           // END_COLLECTION
            };
}

到了这里,关于使用旧手检做成蓝牙键盘的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 我的最佳队友之K8无线蓝牙键盘深度使用测评( Keychron K8 )

    首先我们在实际测评之前,看下这个键盘的具体参数,心里有个大致的了解~ 87键 国产佳达隆G轴 可选茶轴/红轴/青轴 蓝牙和有线连接双模,支持键线分离 ABS、激光雕刻键帽,RGB背光 支持Mac/win 双系统 下面就让我们来看下K8的深度体验测评以及常见问题解惑,可以直接点击目

    2024年02月14日
    浏览(33)
  • 参考 | 解决iPad向日葵远程Windows电脑无法使用蓝牙键盘上下左右tab键的问题

    本人一级懒狗,一向不喜欢背电脑出门,带个iPad和蓝牙键盘出门写代码才是最爱,所以我一直是向日葵的死忠粉。在以前一直没有什么问题,我大概记得2021年11月左右,向日葵新推一款蓝牙鼠标,可以适配向日葵的时候,真的欣喜若狂,因为在IOS上鼠标一直是个让人头疼的问

    2024年02月04日
    浏览(54)
  • 【硬件记录】烽影青轴机械键盘的灯光控制键 如何设置?如何设置键盘 跑马灯特效?附:烽影RGB三代快捷键 | 【SCI】计算机/期刊 论文中的 Preliminaries作为目录,一般表示什么意思?

      李白:任世人厌我、妒我、恨我、爱我、笑我、哭我,我只当风曾来过。   🎯作者主页: 追光者♂🔥          🌸个人简介:   💖[1] 计算机专业硕士研究生💖   🌟[2] 2022年度博客之星人工智能领域TOP4🌟   🏅[3] 阿里云社区特邀专家博主🏅   🏆[4] CSDN-人工智能领

    2024年02月02日
    浏览(39)
  • 常识——(adb)小米VR正式版使用第三方APP,电脑充当手机的蓝牙手柄,实现确认功能,从电脑键盘向手机输入文字

    1.小米vr正式在插入手机后,会自动启动小米VR APP,然后因为小米官方已经关闭了小米VR的生态,你面对的只是一个空荡荡的vr界面,以及商店里那些已经老旧的软件(大多已经不再更新,服务器关闭,不能使用) 看着外面的第三方APP比如gizmoVR浏览器,看着外面的VR虚拟应用,

    2024年02月06日
    浏览(56)
  • Android模拟蓝牙蓝牙键盘——适配Android和Windows

    学校寒假有个程序设计比赛,我也一直想要去写一个安卓模拟的蓝牙键盘,这样无论到哪里,比如班班通和没有键盘的电脑设备,有手机就可以操作它,也比USB方便一些。忙活了一个寒假,也走了不少歪路,终于整成了,下面分享一些经验。 (学校的软件设计比赛已经交了终

    2024年04月28日
    浏览(28)
  • 树莓派链接蓝牙键盘

    博主最近刚买了树莓派,其便携性确实让人眼前一亮。只是每次都要连接有线键盘进行输入确实让人有些不爽,由于本人对linux操作系统不是特别了解,因此在网上学习了一下蓝牙键盘的链接方式,最终成功链接了罗技的K480键盘。下面我就将链接过程分享如下。 在进行蓝牙链

    2024年02月09日
    浏览(26)
  • 安卓设备蓝牙键盘快捷键

    日期:2023年1月。 安卓设备可以通过蓝牙或有线外接键盘,值得一提的是,安卓平板连接蓝牙键盘和蓝牙鼠标是一个不错的组合。本文以鸿蒙3.0平板进行测试,介绍一些安卓设备常用的快捷键,内容包含鼠标按键、系统快捷键、桌面快捷键、输入法快捷键、其它快捷键、等等

    2024年02月09日
    浏览(39)
  • mac只有键盘怎么连接蓝牙鼠标

    刚才遇到个问题,手头只有一个键盘和一个蓝牙鼠标,但是最新版本的系统对默认的纯键盘控制不太友好,得自己试出怎么连接,这里把如何在mac mini上用一个键盘连接上蓝牙鼠标,手上这台mini系统版本是14.0,有需要的朋友可以参考。 尝试了一个小时搞好了,手上的设备是

    2024年01月17日
    浏览(32)
  • Unity实战(10):如何将某个相机的画面做成贴图(RenderTexture)

    目录 前言 一、创建物体、材质与相机 二、将RenderTexture赋给材质 2.1 修改rt1的一些属性 2.2 将rtMat1材质的shader改为Unlit/Texture,并将rt1赋给这个材质 三、效果呈现 本文记录如何将某个相机的画面做成贴图,即游戏某些场景中小地图做法或虚拟监控效果,使用到的是RenderTexture

    2024年02月09日
    浏览(30)
  • logi k380 蓝牙键盘 与macbook 连接断开

    logi k380 蓝牙键盘正常连接macbook后, 经常自动断开连接; 按键卡住,重复输入某个符号。 出现以上问题后,如果尝试重新连接键盘,发现macbook一直无法与键盘连接,除非重新启动macbook。 macOS Ventura 13.0.1 打开macOS系统自带的Activity Monitor (活动监视器) 找到bluetoothd 进程 选中

    2024年02月13日
    浏览(42)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包