Catalyzes the ADP-dependent phosphorylation of D-glucose to D-glucose 6-phosphate and glucosamine to glucosamine 6-phosphate. Can also use CDP as the phosphoryl group donor and D-1,5-anhydroglucitol as the phosphoryl group acceptor. ADP + D-glucose = AMP + D-glucose 6-phosphate + H(+) ADP + D-glucosamine = AMP + D-glucosamine 6-phosphate + H(+) Binds 1 Mg(2+) ion per subunit. Optimum pH is about 7.5. Optimum temperature is 105 degrees Celsius. Activity observed at 100 degrees Celsius is about 8 times that at 37 degrees Celsius. Thermostable up to 95 degrees Celsius. Retains full activity after heating at 90 degrees Celsius for 10 minutes and more than 95% of the full activity at 100 degrees Celsius for 10 minutes. Has a half-life of 220 minutes at 100 degrees Celsius. Inactive after heating at 110 degrees Celsius for 30 minutes. Carbohydrate degradation; glycolysis. Homodimer. Belongs to the ADP-dependent glucokinase family.